2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr36373-7.c
blob103694e1517f6e00a9b8f21a56cafd15aba246b4
1 /* { dg-do run } */
3 extern void abort (void);
4 struct Foo {
5 int *p;
6 } x;
7 struct Foo __attribute__((noinline))
8 bar(int *p)
10 struct Foo f;
11 f.p = p;
12 return f;
14 void __attribute__((noinline))
15 foo()
17 *x.p = 0;
19 int main()
21 int b;
22 b = 1;
23 struct Foo g = bar (&b);
24 x = g;
25 foo();
26 if (b != 0)
27 abort ();
28 return 0;