PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20080604-1.c
blob5ba35cb2cf5c22ef825793facfcdff697da3e3f7
1 struct barstruct { char const* some_string; } x;
2 extern void abort (void);
3 void __attribute__((noinline))
4 foo(void)
6 if (!x.some_string)
7 abort ();
9 void baz(int b)
11 struct barstruct bar;
12 struct barstruct* barptr;
13 if (b)
14 barptr = &bar;
15 else
17 barptr = &x + 1;
18 barptr = barptr - 1;
20 barptr->some_string = "Everything OK";
21 foo();
22 barptr->some_string = "Everything OK";
24 int main()
26 x.some_string = (void *)0;
27 baz(0);
28 if (!x.some_string)
29 abort ();
30 return 0;