FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / virtual4.C
blob64dc51a4081d17496a6f1942e9a1f877bdae3a96
1 // Origin: Mark Mitchell <mark@codesourcery.com>
3 struct B 
5   B ();
6   virtual void f () = 0;
7 };
9 B::B () 
13 extern B* bp;
15 template <class T>
16 struct C : public B
18   virtual void f () 
19     {
20     }
23 template <class T>
24 struct D : public B
26   virtual void f () 
27     {
28       bp = new C<T*>;
29     }
32 B* bp = new D<int>;
34 int main ()
36   bp->f ();
37   bp->f ();