summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr78148.c
blob: c3c9b2e9a892aaec6ff2a646a8113112dffb4be9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* PR target/78148 */
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */

struct A { int a, b; };
struct B { char c, d; };
extern void bar (struct A, struct B);
struct C { char e, f; } a;
struct D
{
  int g;
  struct C h[4];
};
struct D *e;

struct D
foo (void)
{
  int b;
  struct B c;
  struct A d;
  d.b = c.c = c.d = 0;
  bar (d, c);
}

void
baz ()
{
  e->h[0].e = e->h[0].f = 0;
  foo ();
}