// { dg-do assemble } struct A { void f() {} template void f() {} }; template struct B { void f() {} template void f() {} }; template struct B; struct C { template void f() {} // { dg-error "with" } redeclaration template void f() {} // { dg-error "overloaded" } redeclaration }; template struct D { void f(T); void f(U); }; template struct D; template struct D2 { void f(T); // { dg-error "with" } redeclaration void f(U); // { dg-error "overloaded" } redeclaration }; template struct D2; struct E { void f(); // { dg-error "with" } redeclaration void f(); // { dg-error "overloaded" } redeclaration };