2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / instantiate4.C
blob8bbbd5bafebb766dbc8a69e849a215c2e63816aa
1 // { dg-do link }
2 // { dg-options "-frepo -Werror" }
3 // Build then link:
6 // Submitted by Melissa O'Neill <oneill@cs.sfu.ca>
7 // the vtable of Foo<int> wouldn't be generated
9 template <typename A>
10 struct Foo {
11    virtual void foo() {}
14 template <typename A>
15 struct Bar {   
16    void bar();
19 template <typename A> 
20 void Bar<A>::bar() {
21    Foo<A> oof;
24 int main () {
25     Bar<int> rab;
26     
27     rab.bar();