// PR c++/84376 template struct A {}; template T foo() { return T(); } template<> A foo(); // { dg-error "A" }