1 // Test that 'extern template' suppresses instantiations.
5 template <class T> void f (T) { }
6 extern template void f (int);
8 template <class T> struct A {
11 template <class T> void A<T>::f () { }
12 extern template struct A<int>;
14 // { dg-final { scan-assembler-not "\n_?_Z1fIiEvT_(:|\n|\t)" } }
15 void test_f_int () { f(42); }
17 // { dg-final { scan-assembler-not "\n_?_ZN1AIiE1fEv(:|\n|\t)" } }
18 void test_A_int_f () { A<int> a; a.f (); }
20 // { dg-final { scan-assembler "\n_?_Z1fIdEvT_(:|\n|\t)" } }
21 void test_f_double () { f (2.0); }
23 // { dg-final { scan-assembler "\n_?_ZN1AIdE1fEv(:|\n|\t)" } }
24 void test_A_double_f () { A<double> b; b.f (); }