blob: fc1ef385d9cd2bb4a9cf3ee9bf3b828b84549503 [file] [log] [blame]
// { dg-do run }
// Origin: Mark Mitchell <mark@codesourcery.com>
extern "C" void abort ();
struct B;
struct S
{
S (B*);
~S ();
B* b_;
};
struct B
{
B () : s (this) { }
virtual void f () { }
S s;
};
S::S (B* b) : b_ (b) { }
S::~S () { b_->f (); }
struct D : public B
{
virtual void f () { abort (); }
};
int main ()
{
D d;
}