* gcc.dg/ucnid-[23456].c: XFAIL on AIX.
[official-gcc.git] / gcc / testsuite / gcc.dg / i386-call-1.c
blob9cd49da3b2fa12271e0e0ea797b95264a101d7e3
1 /* PR optimization/11304 */
2 /* Originator: <manuel.serrano@sophia.inria.fr> */
3 /* { dg-do run { target i?86-*-* } } */
4 /* { dg-options "-O -fomit-frame-pointer" } */
6 /* Verify that %eax is always restored after a call. */
8 extern void abort(void);
10 volatile int r;
12 void set_eax(int val)
14 __asm__ __volatile__ ("mov %0, %%eax" : : "m" (val));
17 void foo(int val)
19 r = val;
22 int bar(int x)
24 if (x)
26 set_eax(0);
27 return x;
30 foo(x);
33 int main(void)
35 if (bar(1) != 1)
36 abort();
38 return 0;