struct A { };
struct B { };

A f(const B & b) {
  return A();
}

template<>
B f(const A & a) { // { dg-error "" }
  return B();
}



syntax highlighted by Code2HTML, v. 0.9.1