[LLVMdev] Is it an opt bug ?

John Regehr regehr at cs.utah.edu
Tue Feb 28 08:48:21 PST 2012


> void t2(double *x)
> {
>       long long a[2];
>       a[0] = 3;
>       a[1] = 5;
>       *x = * ((double *) a);
>       *(x+1) = * ((double *) &a[a[0]-2]);
> }

Doesn't this code violate the strict aliasing rules?

John


More information about the llvm-dev mailing list