[fpc-devel] about bug 0016668 (-gt -O2)

Martin lazarus at mfriebe.de
Tue Jun 8 16:35:02 CEST 2010


> It's caused by the broken x86 behaviour of "x shl 32 = x". It does not 
> affect in any way the correctness of code generated with -gt though, 
> except that some variables are indeed initialised with 0 instead of 
> with the intended trashing value. 

Yes, trashing with 0 does not corrupt the code => I am aware of that.

But as I pointed out, something else does (that something else may be 
Lazarus or FPC). So far I have no idea what this something else could be.

There is a slight change, that correct trashing, may change the location 
of the error in a way that will allow it, to track the problem. Of 
course, it may not, it's ju7st a hope.

There is also the fact that -gt (at least if used with -O2) in some 
cases initializes (or zero-trashes) edx, even if edx is not used at all 
in the procedure
     movl    $0,%edx
There may be a reason for this, which I don't know?


Martin



More information about the fpc-devel mailing list