2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20020218-1.c
blob2887328d5fb743ffd2779bc68b0c18732e2cbee0
1 /* Verify that X86-64 only SSE registers aren't restored on IA-32. */
2 /* { dg-do compile { target i?86-*-* } } */
3 /* { dg-options "-O2 -msse" } */
4 /* { dg-final { scan-assembler-not "xmm8" } } */
6 extern void abort (void);
7 extern void exit (int);
9 void *bar (void *p, void *q)
11 if (p != (void *) 26 || q != (void *) 35)
12 abort ();
13 return (void *) 76;
16 void *foo (void **args)
18 void *argcookie = &args[1];
20 __builtin_return (__builtin_apply (args[0], &argcookie,
21 2 * sizeof (void *)));
24 int main (void)
26 void *args[3];
28 args[0] = (void *) bar;
29 args[1] = (void *) 26;
30 args[2] = (void *) 35;
31 if (foo (args) != (void *) 76)
32 abort ();
33 exit (0);