+2020-05-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/66439
+ * pt.c (fn_type_unification): Pass 'fn' instead of NULL_TREE as
+ the 'in_decl' parameter to coerce_template_parms.
+
2020-05-18 Marek Polacek <polacek@redhat.com>
PR c++/94955
/* Adjust any explicit template arguments before entering the
substitution context. */
explicit_targs
- = (coerce_template_parms (tparms, explicit_targs, NULL_TREE,
+ = (coerce_template_parms (tparms, explicit_targs, fn,
complain|tf_partial,
/*require_all_args=*/false,
/*use_default_args=*/false));
+2020-05-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/66439
+ * g++.dg/cpp2a/concepts-ts4.C: Expect a "type/value mismatch"
+ diagnostic.
+ * g++.dg/cpp2a/concepts-ts6.C: Likewise.
+ * g++.dg/template/error56.C: Likewise.
+ * g++.dg/template/error59.C: New test.
+
2020-05-18 Marek Polacek <polacek@redhat.com>
PR c++/94955
fn<0>(); // OK
fn<-1>(); // { dg-error "" }
fn<int>(); // { dg-error "no matching function" }
+ // { dg-error "type/value mismatch at argument 1" "" { target *-*-* } .-1 }
+ // { dg-message "expected a constant of type .int., got .int." "" { target *-*-* } .-2 }
}
f<X>();
f<int>(); // { dg-error "no matching function for call" }
+ // { dg-error "type/value mismatch at argument 1" "" { target *-*-* } .-1 }
+ // { dg-message "expected a class template, got .int." "" { target *-*-* } .-2 }
S2<int> s2a;
S2<char, signed char, unsigned char> s2b;
S6<void, void> s6a;
S6<void, int> s6c; // { dg-error "template constraint failure" }
S6<void, void, void> s6b; // { dg-error "wrong number of template arguments" }
-}
\ No newline at end of file
+}
int main()
{
A().f<1>(); // { dg-error "f<1>" }
+ // { dg-error "type/value mismatch at argument 1" "" { target *-*-* } .-1 }
+ // { dg-message "expected a type, got .1." "" { target *-*-* } .-2 }
}
--- /dev/null
+template<int N> struct S { };
+
+template<template<typename> class TT>
+void foo();
+
+void bar()
+{
+ foo<S>(); // { dg-error "no matching function" }
+ // { dg-error "type/value mismatch at argument 1" "" { target *-*-* } .-1 }
+ // { dg-message "expected a template of type .template<class> class TT., got .template<int N> struct S." "" { target *-*-* } .-2 }
+}
+2020-05-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/66439
+ * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
+ mismatch" messages.
+ * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
+
2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/95147
}
// { dg-prune-output "tuple_element<2" }
+// { dg-prune-output "type/value mismatch" }
}
// { dg-prune-output "no type named .type" }
+// { dg-prune-output "type/value mismatch" }