Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.dg / opt / pr23299.C
blob94a414aa5f7999e70c77a5d6841eb2ffd91f5a07
1 // PR rtl-optimization/23299
2 // { dg-do run }
3 // { dg-options "-Os" }
5 extern "C" void abort ();
7 struct A
9   virtual int a () {}
11 struct B : public A
13   virtual int b () {}
15 struct C : public A
17   virtual int c () {}
19 struct D
21   D () { d = 64; }
22   ~D ();
23   int d;
26 int x;
27 D::~D ()
29   x |= 1;
30   if (d != 64)
31     abort ();
34 struct E : public B, public C
36   E () {}
37   virtual int c ();
38   ~E ();
39   D dv;
42 E::~E ()
44   int r = c ();
47 int
48 E::c ()
50   if (x > 10)
51     throw 1;
52   x |= 2;
55 int
56 main (void)
58   {
59     E e;
60   }
61   if (x != 3)
62     abort ();