Fix mangling ICE [PR94027]
authorNathan Sidwell <nathan@acm.org>
Fri, 6 Mar 2020 18:51:26 +0000 (10:51 -0800)
committerNathan Sidwell <nathan@acm.org>
Fri, 6 Mar 2020 18:51:26 +0000 (10:51 -0800)
commit191bcd0f30dd37dec773efb0125afdcae9bd90ef
tree283aa99d8c6229b01375dcb502ea8f155365f9dc
parent0b8393221177617f19e7c5c5c692b8c59f85fffb
Fix mangling ICE [PR94027]

PR c++/94027
* mangle.c (find_substitution): Don't call same_type_p on template
args that cannot match.

Now same_type_p rejects argument packs, we need to be more careful
calling it with template argument vector contents.

The mangler needs to do some comparisons to find the special
substitutions.  While that code looks a little ugly, this seems the
smallest fix.
gcc/cp/ChangeLog
gcc/cp/mangle.c
gcc/testsuite/g++.dg/pr94027.C [new file with mode: 0644]