Adriaan van Os wrote:
2b. this can be worked around by specifying -O2 instead of default -O3.
So, at least there is a work-around.
So it probably fails with inlined routines (that's the only difference between -O2 and -O3 unless this was changed in the latest versions). I had this suspicion earlier ...
Andrew Pinski wrote:
In 3.4 (do not know about 3.3): It looks like the register that is holding the pic address is overwritten in bar so when the jump happens the pic register now holds the pic for bar, not for main so it prints out some garbage. It looks like it should save and restore it in r30 like stack register is. A workaround in 3.4 for applications is to use -mdynamic-no-pic which will get rid of the pic code.
This makes me confident that it will be fixed (or at least that we are making progress).
I'm certain if it won't be solved in 3.5 or reemerges in 3.6, it will be finally fixed in 3.7 or at least a work-around for 3.8 provided in 3.9 which might work on some affected platforms in 4.0, others in 4.1 and in 4.2 they will start working on a real solution for 4.3 or 4.4 ... ;-) Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707