Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / stackalign / push-1.c
blobc23faf411c48a04526a4e1f2c6798dc264c3560f
1 /* PR middle-end/37010 */
2 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
3 /* { dg-additional-options "-mmmx -msse2 -mpreferred-stack-boundary=2" } */
4 /* { dg-require-effective-target sse2_runtime } */
6 #include <emmintrin.h>
8 typedef __PTRDIFF_TYPE__ ptrdiff_t;
9 typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
10 typedef int aligned __attribute__((aligned(16)));
12 extern void abort (void);
14 __m128 r;
16 int
17 __attribute__ ((noinline))
18 check_int (int *i, int align)
20 *i = 20;
21 if ((((ptrdiff_t) i) & (align - 1)) != 0)
23 abort ();
25 return *i;
28 void
29 __attribute__ ((noinline))
30 foo (__m128 x, __m128 y ,__m128 z ,__m128 a, int size)
32 aligned i;
34 if (size != 5 || check_int (&i, __alignof__(i)) != i)
35 abort ();
37 r = a;
40 int
41 main (void)
43 __m128 x = { 1.0 };
45 foo (x, x, x, x, 5);
47 if (__builtin_memcmp (&r, &x, sizeof (r)))
48 abort ();
50 return 0;