Wrong RTL instruction deleted

Robert Dewar dewar@adacore.com
Mon Dec 27 13:40:00 GMT 2004


Richard Guenther wrote:

> Well, but t08.gimple contains
> 
> float foo() ()
> {
>   float D.1564;
>   float * MASK.0;
> 
>   {
>     unsigned int MASK;
> 
>     MASK = 080000000;
>     MASK.0 = (float *) &MASK;
>     D.1564 = *MASK.0;
>     return D.1564;
>   }
> }
> 
> here we _have_ pointers.  If the above were the actual testcase it would be
> invalid, no?  Though the code with the union doesn't look different here.

Right, the above code would be invalid. At least that's my
understanding. It would be interesting to try the identical
code in Ada. There for *sure* I know that the first example
would be valid and the second example invalid :-)
> 
> Also, with -fno-strict-aliasing the "bug" doesn't occour.



More information about the Gcc mailing list