blob: bf293ed2b860efe0833b8496fa89230ff7ca5aba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// { dg-do link }
// { dg-options "-g -fno-inline -Wno-deprecated -fexternal-templates" }
// GROUPS passed templates
// Bug: g++ emits template instances when it shouldn't.
// Suppressed-instantiation tests like this are known to break on
// Cygwin, because of the MULTIPLE_SYMBOL_SPACES stuff. This is OK.
#pragma implementation "irrelevant_file"
#line 1 "template18.h"
#pragma interface
template <class T> inline T min (T a, T b) { return a<b?a:b; }
#line 13 "template18.C"
main()
{
min (1, 1); // { dg-error "" "" { target *-*-* } 0 } should produce an undefined symbol error.
}
|