OSDN Git Service

PR rtl-optimization/52139
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / pr38895.c
1 /* { dg-do compile } */
2 /* { dg-options "-O -fstrict-aliasing -fdump-tree-optimized" } */
3
4 struct A {
5   int i;
6   int j;
7 };
8 struct B {
9   struct A a1;
10   struct A a2;
11 };
12 struct C {
13   struct A a1;
14   struct B b;
15 };
16 int foo(struct C *c, struct B *b)
17 {
18   c->a1.i = 1;
19   b->a1.i = 0;
20   return c->a1.i;
21 }
22
23 /* { dg-final { scan-tree-dump "return 1;" "optimized" } } */
24 /* { dg-final { cleanup-tree-dump "optimized" } } */