Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / gcc.dg / 20020218-1.c
blob240c3d7e2ab3ff6340607106130fb49ef80be6e0
1 /* Verify that X86-64 only SSE registers aren't restored on IA-32. */
2 /* { dg-do compile { target i?86-*-* } } */
3 /* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
4 /* { dg-options "-O2 -msse" } */
5 /* { dg-final { scan-assembler-not "xmm8" } } */
7 extern void abort (void);
8 extern void exit (int);
10 void *bar (void *p, void *q)
12 if (p != (void *) 26 || q != (void *) 35)
13 abort ();
14 return (void *) 76;
17 void *foo (void **args)
19 void *argcookie = &args[1];
21 __builtin_return (__builtin_apply (args[0], &argcookie,
22 2 * sizeof (void *)));
25 int main (void)
27 void *args[3];
29 args[0] = (void *) bar;
30 args[1] = (void *) 26;
31 args[2] = (void *) 35;
32 if (foo (args) != (void *) 76)
33 abort ();
34 exit (0);