--- Comment #4 from pinskia at gcc dot gnu dot org 2008-02-27 01:59 ---
(In reply to comment #3)
> 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?
There should be a warning but someti
--- 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
--- 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 *vp = (complex *) &vSum;
...
spectra[4*j] = vp[0];
spectra[4*j+2] = vp[1];
--
pinskia at
--- Comment #1 from kes at smolek dot com 2008-02-26 23:17 ---
Created an attachment (id=15234)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15234&action=view)
temp file output demonstrating the bug
Command line: gcc -v -save-temps -O2 -S -msse3 ComputeEven.cpp
Note: bug occurs