Opened 13 years ago
Last modified 9 years ago
#1741 new defect
Runtime parameter evaluation and external objects
Reported by: | mburisch | Owned by: | mburisch |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Version: | ||
Keywords: | Cc: | mburisch, Lennart Ochel, Willi Braun |
Description
The recent change in parameter evaluation at runtime (revision 11850) breaks external object constructors which use depending parameters. Since the change their initial value is 0 or the empty string. However, the constructor of external objects are called before the parameters are assigned their values, therefore leading to wrong initializations.
Attached is a small example build with the following commands:
{{{gcc -c testobj.c -o testobj.o
ar -ru libTestObj.a testobj.o
omc test.mos}}}
The expected output is 5, however, due to runtime parameter evaluation it is 0.
As a first shot we need to separate the instantiation of external functions into two groups. One group of functions that are need to evaluate parameters and the other group that may depends on parameters.