* method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / dtor5.C
blobab37e39f9f837e431fba22da50c26e298f78a277
1 // Origin: Mark Mitchell <mark@codesourcery.com>
3 extern "C" void abort ();
5 struct B;
7 struct S 
9   S (B*);
10   ~S ();
12   B* b_;
15 struct B 
17   B () : s (this) { }
18       
19   virtual void f () { }
20   
21   S s;
24 S::S (B* b) : b_ (b) { }
26 S::~S () { b_->f (); }
27   
28 struct D : public B
30   virtual void f () { abort (); }
33 int main ()
35   D d;