URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [virtual4.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do run }
// Origin: Mark Mitchell <mark@codesourcery.com>
struct B
{
B ();
virtual void f () = 0;
};
B::B ()
{
}
extern B* bp;
template <class T>
struct C : public B
{
virtual void f ()
{
}
};
template <class T>
struct D : public B
{
virtual void f ()
{
bp = new C<T*>;
}
};
B* bp = new D<int>;
int main ()
{
bp->f ();
bp->f ();
}