// { dg-do run } extern "C" void abort (); template void f (); template void g () { abort (); } template <> void g () { abort (); } template class C { public: void ff () { f (0); } void gg () { g (1); } template void f () { abort(); } template void g () { abort(); } template void f (int) {} template void g (int) {} }; template void f () { abort (); } template <> void f () { abort (); } int main () { C c; c.ff(); c.gg(); C d; d.ff(); d.gg(); }