| 1 |
// { dg-do link } |
| 2 |
// { dg-additional-sources " instantiate5.cc instantiate5-main.cc" } |
| 3 |
|
| 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 |
| 8 |
|
| 9 |
// simplified from test case submitted by Daniel X. Pape <[email protected]> |
| 10 |
|
| 11 |
template <class T> void foo() { } |
| 12 |
inline int bar() { foo<void>(); return 1; } |
| 13 |
static int i = bar(); |