libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / alias-access-path-5.c
blobc58d478e0eba17e05ed48c9326f35310eedcd209
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
5 struct a {int v1;
6 int v2;};
7 struct b {int array[0]; struct a a[];};
8 union c {struct b b;};
10 int
11 test (struct b *bptr1, union c *cptr, int i, int j)
13 bptr1->a[i].v1=123;
14 cptr->b.a[j].v2=1;
15 return bptr1->a[i].v1;
17 int
18 test2 (struct b *bptr1, union c *cptr, int i, int j)
20 bptr1->a[i].v1=124;
21 cptr->b.a[j].v1=1;
22 return bptr1->a[i].v1;
24 /* { dg-final { scan-tree-dump-times "return 123" 1 "optimized" { xfail *-*-* } } } */
25 /* { dg-final { scan-tree-dump-not "return 124" "optimized"} } */