This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] Pr 85265 ("[concepts] ICE with missing identifier")
- From: Nathan Sidwell <nathan at acm dot org>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>
- Date: Wed, 29 Aug 2018 07:36:29 -0400
- Subject: Re: [C++ Patch] Pr 85265 ("[concepts] ICE with missing identifier")
- References: <fd83cc61-59ca-d2a5-986b-931283116b0d@oracle.com>
On 08/29/2018 05:56 AM, Paolo Carlini wrote:
Hi,
in this small error-recovery issue, we don't notice that
cp_parser_identifier returns error_mark_node because the
introduction-list is empty and we proceed to assign the error_mark_node
to DECL_NAME (parm) to crash later in find_local_binding - in general
the front-end doesn't expect to find an error_mark_node as DECL_NAME. I
think we can simply add the check here too and early exit the loop in
the cases at issue. I'm also consistently tweaking a bit error-recovery
in the caller, cp_parser_template_introduction - note that currently
nargs is never zero: due to the above slightly broken logic the vector
has always at least an element (possibly with DECL_NAME ==
error_mark_node). Tested x86-64-linux.
ok
--
Nathan Sidwell