2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / instantiate5.C
blob21d8b334732fd606afbb41dce4c6940902ae626c
1 // { dg-do link  }
2 // { dg-additional-sources " instantiate5.cc instantiate5-main.cc" }
4 // `global constructors' are given the same name, based on foo(), on
5 // both translation units, which is wrong, because it must be possible
6 // to define template functions in multiple translation units, as long
7 // as they're given the same definition
9 // simplified from test case submitted by Daniel X. Pape <dpape@canis.uiuc.edu>
11 template <class T> void foo() { }
12 inline int bar() { foo<void>(); return 1; }
13 static int i = bar();