Comment 15 for bug 721531

Revision history for this message
Michael Hope (michaelh1) wrote :

Hi Ken. I'm not surprised by the results above. At all optimisation levels, GCC knows the alignment of a variable and therefore knows the value of the lower bits. At -O0 'foo' works as this information isn't propagated to the next line. 'thumb' fails as the value and alignment are available right there in the expression.

-O2 is as expected. 'foo' is different as the value propagates to the fp & 0x1L expression.

Note that the work-around of pushing the value through the getfp() function works correctly.

GCC is still wrong though...