2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr36373-4.c
blob5f3b8334901723fb37d75daa9944cd572f7699e2
1 /* { dg-do run } */
3 extern void abort (void);
4 struct Foo {
5 int *p;
6 int *q;
7 };
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(struct Foo f)
18 *f.p = 0;
20 int main()
22 int a, b;
23 a = 0;
24 b = 1;
25 struct Foo f;
26 f = bar (&b);
27 f.q = &a;
28 foo(f);
29 if (b != 0)
30 abort ();
31 return 0;