* gcc.dg/ucnid-[23456].c: XFAIL on AIX.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr9771-1.c
blob1e3bc036aeee40cdea9f0dfde6c3fcf6ccf9cc2d
1 /* PR rtl-optimization/9771 */
2 /* { dg-do run { target i?86-*-* } } */
3 /* { dg-options "-O2 -fomit-frame-pointer -ffixed-ebp" } */
5 extern void abort(void);
6 extern void exit(int);
8 register long *B asm ("ebp");
10 long x = 10;
11 long y = 20;
13 void bar(void)
15 B = &y;
18 void foo()
20 long *adr = B;
21 long save = *adr;
23 *adr = 123;
25 bar();
27 *adr = save;
30 int main()
32 B = &x;
34 foo();
36 if (x != 10 || y != 20)
37 abort();
39 /* We can't return, as our caller may assume %ebp is preserved! */
40 /* We could save/restore it (like foo), but its easier to exit. */
41 exit(0);