/* PR c/34146 */
|
/* PR c/34146 */
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2 -fdump-tree-gimple" } */
|
/* { dg-options "-O2 -fdump-tree-gimple" } */
|
|
|
struct A
|
struct A
|
{
|
{
|
int f1, f2, f3;
|
int f1, f2, f3;
|
};
|
};
|
|
|
struct B
|
struct B
|
{
|
{
|
struct A g1, g2;
|
struct A g1, g2;
|
};
|
};
|
|
|
struct C
|
struct C
|
{
|
{
|
struct B h1, h2;
|
struct B h1, h2;
|
};
|
};
|
|
|
typedef union
|
typedef union
|
{
|
{
|
struct C c;
|
struct C c;
|
char s[4];
|
char s[4];
|
long int a;
|
long int a;
|
} T;
|
} T;
|
|
|
void
|
void
|
foo (void)
|
foo (void)
|
{
|
{
|
T t = { { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 0, 0, 0 }, { 0, 0, 0 } } } };
|
T t = { { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 0, 0, 0 }, { 0, 0, 0 } } } };
|
test (&t);
|
test (&t);
|
}
|
}
|
|
|
void
|
void
|
bar (void)
|
bar (void)
|
{
|
{
|
T t = { { { { 0, 0, 0 }, (struct A) { 0, 0, 0 } },
|
T t = { { { { 0, 0, 0 }, (struct A) { 0, 0, 0 } },
|
(struct B) { (struct A) { 0, 0, 0 }, { 0, 0, 0 } } } };
|
(struct B) { (struct A) { 0, 0, 0 }, { 0, 0, 0 } } } };
|
test (&t);
|
test (&t);
|
}
|
}
|
|
|
void
|
void
|
baz (void)
|
baz (void)
|
{
|
{
|
T t = { { { { 0, 0, 0 }, (struct A) { 1, 1, 1 } },
|
T t = { { { { 0, 0, 0 }, (struct A) { 1, 1, 1 } },
|
(struct B) { (struct A) { 0, 0, 0 }, { 1, 1, 1 } } } };
|
(struct B) { (struct A) { 0, 0, 0 }, { 1, 1, 1 } } } };
|
test (&t);
|
test (&t);
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
|
/* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
|
/* { dg-final { scan-tree-dump-not "t\.c\.h\[12\] = D" "gimple"} } */
|
/* { dg-final { scan-tree-dump-not "t\.c\.h\[12\] = D" "gimple"} } */
|
/* { dg-final { scan-tree-dump-not "\.g\[12\] = D" "gimple"} } */
|
/* { dg-final { scan-tree-dump-not "\.g\[12\] = D" "gimple"} } */
|
/* { dg-final { cleanup-tree-dump "gimple" } } */
|
/* { dg-final { cleanup-tree-dump "gimple" } } */
|
|
|