c++: Fix template parm ICE [PR 98297]
authorNathan Sidwell <nathan@acm.org>
Wed, 16 Dec 2020 19:49:41 +0000 (11:49 -0800)
committerNathan Sidwell <nathan@acm.org>
Wed, 16 Dec 2020 19:57:31 +0000 (11:57 -0800)
commit8d8bb85b48693a8a8a26e03ea4469888a1170f01
treeb38d3a2be52623f72cc2da0afabaa3c0cc8fadcd
parent3f78c8cb7f0e025a61734af8d9b9ad70e1b66e40
c++: Fix template parm ICE [PR 98297]

I think this is nonsense code, we seem to be naming an instantiation
of a template template parm.  But this fixes the ICE.  Perhaps we
should diagnose the issue earlier?

gcc/cp/
* parser.c (cp_parser_elaborated_type_specifier): Test
BOUND_TEMPLATE_TEMPLATE_PARM before checking for instantiation.
gcc/testsuite/
* g++.dg/template/pr98297.C: New.
gcc/cp/parser.c
gcc/testsuite/g++.dg/template/pr98297.C [new file with mode: 0644]