gcc/libstdc++-v3/testsuite
Patrick Palka 864fed4a49 c++: Explain fn template argument type/value mismatches [PR66439]
In fn_type_unifcation, we are passing NULL_TREE as the 'in_decl'
parameter to coerce_template_parms, and this is causing template
type/value mismatch error messages to get suppressed regardless of the
value of 'complain'.

This means that when substitution into a function template fails due to
a type/value mismatch between a template parameter and the provided
template argument, we just say "template argument deduction/substitution
failed:" without a followup explanation of the failure.

Fix this by passing 'fn' instead of NULL_TREE to coerce_template_parms.

gcc/cp/ChangeLog:

	PR c++/66439
	* pt.c (fn_type_unification): Pass 'fn' instead of NULL_TREE as
	the 'in_decl' parameter to coerce_template_parms.

gcc/testsuite/ChangeLog:

	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.

libstdc++-v3/ChangeLog:

	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-18 23:50:14 -04:00
..
17_intro libstdc++: Add more tests for _E10, _E11 etc. (PR 94901) 2020-05-01 14:49:48 +01:00
18_support libstdc++: Fix constraints on std::compare_three_way 2020-04-14 21:59:15 +01:00
19_diagnostics libstdc++: Define operator<=> for <system_error> types 2020-02-20 12:27:48 +00:00
20_util c++: Explain fn template argument type/value mismatches [PR66439] 2020-05-18 23:50:14 -04:00
21_strings libstdc++: Fixes for feature test macros (PR 91480) 2020-04-28 23:40:18 +01:00
22_locale Update copyright years. 2020-01-01 12:51:42 +01:00
23_containers libstdc++: Fix regression in std::_Construct (PR 94831) 2020-04-28 23:39:38 +01:00
24_iterators libstdc++: Replace deduced return type in ranges::iter_move (PR 92894) 2020-05-01 14:27:25 +01:00
25_algorithms libstdc++ std::fill overload for std::vector<bool>::iterator 2020-05-06 23:28:22 +02:00
26_numerics libstdc++: Add comparison operators to types from Numerics clause 2020-04-08 16:51:59 +01:00
27_io libstdc++: Add comparison operators to std::filesystem types 2020-04-15 21:01:42 +01:00
28_regex libstdc++: Add comparison operators for string and regex types 2020-04-17 16:40:11 +01:00
29_atomics Actually comment the new tests 2020-05-12 07:38:28 +02:00
30_threads libstdc++: Update value of __cpp_lib_jthread macro 2020-04-22 22:54:34 +01:00
abi Update copyright years. 2020-01-01 12:51:42 +01:00
backward Update copyright years. 2020-01-01 12:51:42 +01:00
config Update copyright years. 2020-01-01 12:51:42 +01:00
data
decimal Update copyright years. 2020-01-01 12:51:42 +01:00
experimental x86-vxworks malloc aligns to 8 bytes like solaris 2020-05-13 04:49:00 -03:00
ext libstdc++: Avoid errors in allocator's noexcept-specifier (PR 89510) 2020-04-30 16:01:43 +01:00
lib libstdc++: Fix PSTL tests to run correctly with newer Thread Building Blocks 2020-04-21 01:05:13 -07:00
libstdc++-abi Update copyright years. 2020-01-01 12:51:42 +01:00
libstdc++-dg Update copyright years. 2020-01-01 12:51:42 +01:00
libstdc++-prettyprinters Update copyright years. 2020-01-01 12:51:42 +01:00
libstdc++-xmethods Update copyright years. 2020-01-01 12:51:42 +01:00
performance Update copyright years. 2020-01-01 12:51:42 +01:00
special_functions Update copyright years. 2020-01-01 12:51:42 +01:00
std libstdc++: Fix subrange::advance and subrange::prev (LWG 3433) 2020-04-28 16:43:23 -04:00
tr1 libstdc++: Fix test failure due to -Wnonnull warnings 2020-03-12 11:03:04 +00:00
tr2 Update copyright years. 2020-01-01 12:51:42 +01:00
util libstdc++: Fix testsuite utility's use of allocators 2020-04-18 00:12:26 +01:00
Makefile.am Update copyright years. 2020-01-01 12:51:42 +01:00
Makefile.in Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00