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