blob: c5f122adbd93122ab2878cb7ee316a320754ca7f [file] [log] [blame]
// Test that vtables are set up properly for constructors and destructors
// of template classes.
// { dg-do run }
int r;
template <class T>
struct A {
virtual void f () { }
A() { f (); }
~A() { f (); }
};
struct B : public A<int> {
virtual void f () { ++r; }
};
int main ()
{
{ B b; }
return r;
}