[Bug c++/96329] [11/12 Regression] ICE : tree check: expected string_cst, have error_mark in cp_parser_linkage_specification, at cp/parser.c:14640

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 8 23:19:51 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96329

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:

https://gcc.gnu.org/g:8ab72ec7c456c92989276f17fe0ae90a56932149

commit r12-7549-g8ab72ec7c456c92989276f17fe0ae90a56932149
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Tue Mar 8 23:18:34 2022 +0000

    PR c++/96329: ICE-on-invalid-code error recovery.

    This patch fixes PR c++/96329 which is an ICE-on-invalid-code regression
    affecting mainline.

    2022-03-08  Roger Sayle  <roger@nextmovesoftware.com>

    gcc/cp/ChangeLog
            PR c++/96329
            * parser.cc (cp_parser_linkage_specification): Treat the case where
            linkage is error_mark_node as "invalid linkage-specification".

    gcc/testsuite/ChangeLog
            PR c++/96329
            * g++.dg/template/pr96329.C: New test case.


More information about the Gcc-bugs mailing list