Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / instantiate4.C
blob9c1aaf58f3ed95edb3f39644819e68a5d3cc2927
1 // { dg-do link }
2 // { dg-options "-frepo -Werror" }
3 // { dg-require-host-local "" }
4 // Build then link:
7 // Submitted by Melissa O'Neill <oneill@cs.sfu.ca>
8 // the vtable of Foo<int> wouldn't be generated
10 template <typename A>
11 struct Foo {
12    virtual void foo() {}
15 template <typename A>
16 struct Bar {   
17    void bar();
20 template <typename A> 
21 void Bar<A>::bar() {
22    Foo<A> oof;
25 int main () {
26     Bar<int> rab;
27     
28     rab.bar();
31 // { dg-final { cleanup-repo-files } }