2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / union4.C
blob26f12e953c1c77d99a4434d750a7a353944e7948
1 // { dg-do assemble  }
2 // { dg-options "" }
3 // Origin: Mark Mitchell <mark@codesourcery.com>
5 union A
7   int i;
8   int j;
10   A () : i (3), j (2) {} // { dg-error "" } multiple initializations
13 union B
15   int i;
16   union {
17     int j;
18   };
20   B () : i (3), j (2) {} // { dg-error "" } multiple initializations
23 union C
25   union {
26     struct {
27       int i;
28       int j;
29     };
30   };
32   C () : i (3), j (2) {}