URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [vtable1.C] - Rev 693
Compare with Previous | Blame | View Log
// 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;
}