Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / 20060512-3.c
blob5ffa8129e388a9b5f917bcd8249390d8e79ba2b9
1 /* { dg-do run } */
2 /* { dg-require-effective-target ilp32 } */
3 /* { dg-options "-std=gnu99 -msse2 -mstackrealign" } */
5 #include "sse2-check.h"
7 #include <emmintrin.h>
9 __m128i __attribute__ ((__noinline__))
10 vector_using_function ()
12 volatile __m128i vx; /* We want to force a vector-aligned store into the stack. */
13 vx = _mm_xor_si128 (vx, vx);
14 return vx;
16 int __attribute__ ((__noinline__))
17 self_aligning_function (int x, int y)
19 __m128i ignored = vector_using_function ();
20 return (x + y);
22 int g_1 = 20;
23 int g_2 = 22;
25 static void
26 sse2_test (void)
28 int result;
29 asm ("pushl %esi"); /* Disalign runtime stack. */
30 result = self_aligning_function (g_1, g_2);
31 asm ("popl %esi");
32 if (result != 42)
33 abort ();