summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr44946.c
blob: 7b23012458591a5a50dfc6bac22441f60f0febcc (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
struct A
{
  int i;
  long l;
};

struct B
{
  int i;
};

struct C
{
  int i;
  struct B b;
};

struct B foo (struct A a)
{
  struct C *c = (struct C *) &a;
  return c->b;
}
void bar (struct A a, struct B b)
{
  struct C *c = (struct C *) &a;
  c->b = b;
}