@@ -1269,6 +1269,14 @@ dump_decl (cxx_pretty_printer *pp, tree t, int flags)
dump_type (pp, t, flags);
break;
+ case VOID_CST:
+ case INTEGER_CST:
+ case REAL_CST:
+ case STRING_CST:
+ case COMPLEX_CST:
+ pp->constant (t);
+ break;
+
default:
pp_unsupported_tree (pp, t);
/* Fall through to error. */
@@ -0,0 +1,8 @@
+// PR c++/71075
+
+template<typename T, int I> struct A {};
+template<typename T> void foo(A<T,1>) {}
+int main() {
+ foo(A<int,2>()); // { dg-error "no matching" }
+// { dg-message "template argument .2. does not match .1." "" { target *-*-* } 6 }
+}