Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr34146-2.c
blob31007b07f819784a55aa7ffa473dc8714c50a0ae
1 /* PR c/34146 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-gimple" } */
5 struct A
7 int f1, f2, f3;
8 };
10 struct B
12 struct A g1, g2;
15 struct C
17 struct B h1, h2;
20 typedef union
22 struct C c;
23 char s[4];
24 long int a;
25 } T;
27 void
28 foo (void)
30 T t = (T) { { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 0, 0, 0 }, { 0, 0, 0 } } } };
31 test (&t);
34 void
35 bar (void)
37 T t = (T) { { { { 0, 0, 0 }, (struct A) { 0, 0, 0 } },
38 (struct B) { (struct A) { 0, 0, 0 }, { 0, 0, 0 } } } };
39 test (&t);
42 void
43 baz (void)
45 T t = (T) { { { { 0, 0, 0 }, (struct A) { 1, 1, 1 } },
46 (struct B) { (struct A) { 0, 0, 0 }, { 1, 1, 1 } } } };
47 test (&t);
50 /* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
51 /* { dg-final { scan-tree-dump-not "t\.c\.h\[12\] = D" "gimple"} } */
52 /* { dg-final { scan-tree-dump-not "\.g\[12\] = D" "gimple"} } */
53 /* { dg-final { cleanup-tree-dump "gimple" } } */