This is my simple test proggie. test1 is always ok, but test2 fails with -O3 (produces output 1 0 0 0 for test2), but -O2 makes it behave.
I am on x86_64. -m32 has interesting effects: -O3 -Wall -m32 -msse2 -march=i486 is ok (output 1 0 3 0, as expected) -O3 -Wall -m32 -msse2 -march=i586 is broken (output 0 2 3 4) -O3 -Wall -m32 -msse2 -march=athlon is broken (output 1 0 0 0) Is this the aliasing issues I read about with 4.1 compiler? Is there an easy work-around? In fact I need to pass data as aligned buffer, so I need test2 to behave correctly. :-( Do you need anything else? -- Summary: SSE2 generation bug with 4.1.2 and -O3 Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: prakash at punnoor dot de GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31245