libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / alias-access-path-6.c
blobc0de453355fa2b8ddb5aa414a228f4790c3ab596
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* This tests that nonoveralpping_component_refs does not give up
5 on field delcs and continues looking to find mismatch between
6 a1 and a2. */
7 struct a {
8 int a:3;
9 int b:3;
11 struct b {struct a a1,a2;};
12 struct c {struct b b[10];} *cptr;
13 struct d {struct c c;} *dptr;
14 int
15 test(int i,int j)
17 cptr->b[i].a1.a=0;
18 dptr->c.b[j].a2.b=1;
19 return cptr->b[i].a1.a;
21 int
22 test2(int i,int j)
24 cptr->b[i].a1.a=1;
25 dptr->c.b[j].a1.a=0;
26 return cptr->b[i].a1.a;
28 /* { dg-final { scan-tree-dump-times "return 0" 1 "optimized"} } */
29 /* { dg-final { scan-tree-dump-not "return 1" "optimized"} } */