vect: Optimize order of lane-reducing operations in loop def-use cycles
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr34146-2.c
bloba4cd9509b82106612ccd657a68aa897248684962
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 test (T *);
29 void
30 foo (void)
32 T t = (T) { { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 0, 0, 0 }, { 0, 0, 0 } } } };
33 test (&t);
36 void
37 bar (void)
39 T t = (T) { { { { 0, 0, 0 }, (struct A) { 0, 0, 0 } },
40 (struct B) { (struct A) { 0, 0, 0 }, { 0, 0, 0 } } } };
41 test (&t);
44 void
45 baz (void)
47 T t = (T) { { { { 0, 0, 0 }, (struct A) { 1, 1, 1 } },
48 (struct B) { (struct A) { 0, 0, 0 }, { 1, 1, 1 } } } };
49 test (&t);
52 /* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
53 /* { dg-final { scan-tree-dump-not "t\.c\.h\[12\] = D" "gimple"} } */
54 /* { dg-final { scan-tree-dump-not "\.g\[12\] = D" "gimple"} } */