2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / dtor5.C
blobfc1ef385d9cd2bb4a9cf3ee9bf3b828b84549503
1 // { dg-do run  }
2 // Origin: Mark Mitchell <mark@codesourcery.com>
4 extern "C" void abort ();
6 struct B;
8 struct S 
10   S (B*);
11   ~S ();
13   B* b_;
16 struct B 
18   B () : s (this) { }
19       
20   virtual void f () { }
21   
22   S s;
25 S::S (B* b) : b_ (b) { }
27 S::~S () { b_->f (); }
28   
29 struct D : public B
31   virtual void f () { abort (); }
34 int main ()
36   D d;