------- Comment #7 from Joey dot ye at intel dot com 2008-08-04 09:03 ------- This problem is associated with -mpreferred-stack-boundary=2, rather than with stack alignment. Following case fails on trunk before merging with stack branch: $ cat y1.c /* PR middle-end/37010 */ /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ /* { dg-options "-msse2" } */
typedef __PTRDIFF_TYPE__ ptrdiff_t; extern void abort (void); int __attribute__ ((noinline)) check (void *i, int align) { if ((((ptrdiff_t) i) & (align - 1)) != 0) { abort (); } return 0; } typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); void __attribute__ ((noinline)) foo (__m128 x, __m128 y ,__m128 z ,__m128 a, int size) { check(&a, __alignof__(a)); } int main (void) { __m128 x = { 1.0 }; foo (x, x, x, x, 5); return 0; } $ gcc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../src/configure --disable-bootstrap --enable-languages=c,c++,fortran --enable-checking=assert Thread model: posix gcc version 4.4.0 20080707 (experimental) [trunk revision 137572] (GCC) $ gcc -o y1.exe y1.c -m32 -Os -msse2 -mpreferred-stack-boundary=2 $ ./y.exe Aborted -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37010