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