PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr44258.c
blob6dc233b3231ff7946406041aff309030812426f1
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-esra-details" } */
4 struct blah
6 char a[4];
7 };
9 struct str
11 struct blah b1;
12 char x;
15 struct val
17 char y;
18 struct blah b2;
21 union U
23 struct str str;
24 struct val val;
28 extern struct blah e_b1, e_b2;
29 extern union U *e_u;
31 int foo (int b)
33 union U u;
35 u.str.b1 = e_b1;
36 u.val.b2 = e_b2;
37 u.str.b1.a[3] = 0;
39 *e_u = u;
42 /* Epiphany has struct alignment/padding that avoids the overlap of
43 str.b1 and val.b2. */
44 /* { dg-final { scan-tree-dump-times "Created a replacement" 0 "esra" { target { ! "epiphany-*-*" } } } } */
45 /* { dg-final { cleanup-tree-dump "esra" } } */