summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/union3.C
blob: 67903b761b194723093ef4c13b29daa614e252d1 (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
// { dg-do run  }
// Origin: Mark Mitchell <mark@codesourcery.com>

struct A
{
  union 
  {
    int i;
  };
  int j;

  A ();
};

A::A ()
  : i (1), j (i = 0)
{
}

int main ()
{
  A a;
  return a.i;
}