[multiple changes]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr28410.c
blobadc49b15c20bb1cef16ad36db75d6277da4fe1c1
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
4 extern void abort(void);
5 struct Bar { int p; };
6 struct Foo { struct Bar *p; };
7 struct Bar p0 = { 0 };
8 struct Bar p1 = { 1 };
9 void bar(struct Foo *f)
11 f->p = &p0;
13 int foo(struct Foo *f)
15 f->p->p = 1;
16 bar(f);
17 return f->p->p;
19 int main()
21 struct Foo f;
22 f.p = &p1;
23 if (foo(&f) != 0)
24 abort ();
25 return 0;