// { dg-do run } extern "C" void abort(); template struct S1 { static void f(); }; template <> void S1::f() {} struct S2 { template static void g(T); }; template <> void S2::g(double) {} template <> void S2::g(int) {} template struct S3 { template static int h(U); }; template <> template <> int S3::h(int) { return 0; } template <> template <> int S3::h(int) { return 1; } int main() { S1::f(); S2::g(3.0); S2::g(7); if (S3::h(7) != 0) abort(); if (S3::h(7) != 1) abort(); }