summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr40582.c
blob: 51234da40f220d3d2ac89f694db995f232a6e153 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct A
{
  void* q;
  short i;
};

union U
{
  char* p;
  struct A a;
};

struct A foo(union U u)
{
  struct A a = { 0, 0 };
  a = u.a;
  return a;
}