* c-common.c (get_priority): Add check for
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / virtual4.C
blob0cbd23c366ca8831217b5907a6480cf8590b9fc4
1 // { dg-do run  }
2 // Origin: Mark Mitchell <mark@codesourcery.com>
4 struct B 
6   B ();
7   virtual void f () = 0;
8 };
10 B::B () 
14 extern B* bp;
16 template <class T>
17 struct C : public B
19   virtual void f () 
20     {
21     }
24 template <class T>
25 struct D : public B
27   virtual void f () 
28     {
29       bp = new C<T*>;
30     }
33 B* bp = new D<int>;
35 int main ()
37   bp->f ();
38   bp->f ();