summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.old-deja/g++.other/union3.C
blob: 543b714163ba8908c6358679c5a1543e9c1cc1c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// 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;
}
OpenPOWER on IntegriCloud