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.

Attachments (3)

Test.mos (129 bytes ) - added by mburisch 13 years ago.
test.mo (882 bytes ) - added by mburisch 13 years ago.
testobj.c (481 bytes ) - added by mburisch 13 years ago.

Download all attachments as: .zip

Change History (3)

by mburisch, 13 years ago

Attachment: testobj.c added

comment:1 by Willi Braun, 13 years ago

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.

comment:2 by Dietmar Winkler, 9 years ago

Milestone: Future
Note: See TracTickets for help on using tickets.