PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / vararg-2.c
blob5ee0c51591944675de0ebabbb5e72c9f43982dfd
1 /* PR middle-end/36859 */
2 /* { dg-do run } */
3 /* { dg-options "-w -msse2" } */
4 /* { dg-additional-options "-mpreferred-stack-boundary=2" { target ia32 } } */
5 /* { dg-require-effective-target sse2 } */
7 #include "sse2-check.h"
8 #include <stdarg.h>
9 #include <emmintrin.h>
11 __m128
12 __attribute__((noinline))
13 test (int a, ...)
15 __m128 x;
16 va_list va_arglist;
18 va_start (va_arglist, a);
19 x = va_arg (va_arglist, __m128);
20 va_end (va_arglist);
21 return x;
24 __m128 n1 = { -283.3, -23.3, 213.4, 1119.03 };
26 int
27 __attribute__((noinline))
28 foo (void)
30 __m128 x = test (1, n1);
31 if (__builtin_memcmp (&x, &n1, sizeof (x)) != 0)
32 abort ();
33 return 0;
36 static void
37 __attribute__((noinline))
38 sse2_test (void)
40 foo ();