This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ Patch] Pr 85265 ("[concepts] ICE with missing identifier")


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.

Thanks, Paolo.

///////////////////////

Attachment: CL_85265
Description: Text document

Attachment: patch_85265
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]