// PR c++/57327 template struct A {}; template void f(A&) {} struct B : A {}; struct C : A {}; struct D : B, C {}; int main() { D d; f(d); // { dg-error "no matching" } } // { dg-message "'A' is an ambiguous base" "" { target *-*-* } 18 }