// { dg-do compile { target c++11 } } template struct A { static void foo(){} }; template <> struct A { using foo = int; }; template auto f(T1 t1) -> decltype(A::foo()); /* if the comparing_specializations check breaks in cp_tree_equal case PARM_DECL, the error will incorrectly report A */ template auto g(T2 t2) -> decltype(A::foo()); // { dg-error "dependent-name .A::foo" } void h() { f(0); g('0'); // { dg-error "no matching function" } }