c++: Crash when deducing template arguments [PR98659]
authorMarek Polacek <polacek@redhat.com>
Wed, 13 Jan 2021 18:12:14 +0000 (13:12 -0500)
committerMarek Polacek <polacek@redhat.com>
Tue, 19 Jan 2021 22:41:20 +0000 (17:41 -0500)
commit2b27f37f90cb66e277b734c605639e2f00a2e942
treede1eff1485fbf3909983e47a81a2bcc59cacfb64
parenteed40bca6f2eb3af0c811cf6ec9e123c5bf4907d
c++: Crash when deducing template arguments [PR98659]

maybe_instantiate_noexcept doesn't expect to see error_mark_node, but
the new callsite I introduced in r11-6476 can pass error_mark_node to
it.  So cope.

gcc/cp/ChangeLog:

PR c++/98659
* pt.c (maybe_instantiate_noexcept): Return false if FN is
error_mark_node.

gcc/testsuite/ChangeLog:

PR c++/98659
* g++.dg/template/deduce8.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/template/deduce8.C [new file with mode: 0644]