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