1 /* PR tree-optimization/33723 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-gimple" } */
4
5 typedef union
6 {
7 struct
8 {
9 int f1, f2, f3, f4, f5, f6, f7, f8;
10 long int f9, f10;
11 int f11;
12 } f;
13 char s[4];
14 long int a;
15 } T;
16
17 void test (T *);
18
19 void
foo1(void)20 foo1 (void)
21 {
22 T t;
23 t = (T) { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
24 test (&t);
25 }
26
27 void
bar1(void)28 bar1 (void)
29 {
30 T t = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
31 test (&t);
32 }
33
34 void
baz1(void)35 baz1 (void)
36 {
37 T t;
38 t = (const T) { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
39 test (&t);
40 }
41
42 void
foo2(void)43 foo2 (void)
44 {
45 T t;
46 t = (T) { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
47 test (&t);
48 }
49
50 void
bar2(void)51 bar2 (void)
52 {
53 T t = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
54 test (&t);
55 }
56
57 void
baz2(void)58 baz2 (void)
59 {
60 T t;
61 t = (const T) { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
62 test (&t);
63 }
64
65 void
baz3(void)66 baz3 (void)
67 {
68 T t;
69 t = (const T) (T) { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
70 test (&t);
71 }
72
73 /* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
74