2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr36373-6.c
blobc55e3ff3fabc16c48beffdad763d8d787a8ae16f
1 /* { dg-do run } */
2 /* { dg-options "-fno-tree-sra" } */
4 extern void abort (void);
5 struct Foo {
6 int *p;
7 } x;
8 struct Foo __attribute__((noinline))
9 bar(int *p)
11 struct Foo f;
12 f.p = p;
13 return f;
15 void __attribute__((noinline))
16 foo()
18 *x.p = 0;
20 int main()
22 int b;
23 b = 1;
24 struct Foo g = bar (&b);
25 x = g;
26 foo();
27 if (b != 0)
28 abort ();
29 return 0;