------- Comment #3 from kes at smolek dot com  2008-02-27 01:50 -------
Subject: Re:  Invalid vector code generated with -O2

Oops.  Sorry for the false alarm.  But shouldn't there be an error, or 
at least a warning?

pinskia at gcc dot gnu dot org wrote:
> ------- Comment #2 from pinskia at gcc dot gnu dot org  2008-02-26 23:20 
> -------
> You are violating C/C++ aliasing rules:
>
> typedef float v4sf __attribute__ ((vector_size(16)));
>  v4sf vSum;
>  complex<float> *vp = (complex<float> *) &vSum;
> ...
>
>    spectra[4*j] = vp[0];
>    spectra[4*j+2] = vp[1];
>
>
>   


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35386

Reply via email to