OSDN Git Service

* typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / anon6.C
1 // { dg-do run  }
2 extern "C" void abort ();
3
4 struct A {
5   union {
6     int a;
7     double b;
8     int d;
9   };
10   int c;
11 };
12
13 struct B : public A {
14   union {
15     double a;
16     void *c;
17   };
18   float b;
19   int e;
20 };
21
22 int main ()
23 {
24   struct B b;
25
26   b.a = 1.5;
27   b.b = 2.5;
28   b.d = 1;
29   b.e = 2;
30   if (b.a != 1.5 || b.b != 2.5 || b.d != 1 || b.e != 2)
31     abort ();
32   b.c = &b.a;
33   b.d = b.e;
34   if (b.c != &b.a || b.d != 2)
35     abort ();
36   return 0;
37 }