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
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to