[Bug c/94705] [8/9 Regression] internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in diag_attr_exclusions, at attribs.c:396 since r8-5161

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 16 19:20:48 GMT 2020


--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek


commit r9-8883-g934ede34973909eb15b678f88395d83be01433e7
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Apr 23 09:54:14 2020 +0200

    attribs: Don't diagnose attribute exclusions during error recovery

    On the following testcase GCC ICEs, because last_decl is error_mark_node,
    and diag_attr_exclusions assumes that if it is not NULL, it must be a decl.

    The following patch just doesn't diagnose attribute exclusions if the
    other decl is erroneous (and thus we've already reported errors for it).

    2020-04-23  Jakub Jelinek  <jakub@redhat.com>

            PR c/94705
            * attribs.c (decl_attribute): Don't diagnose attribute exclusions
            if last_decl is error_mark_node or has such a TREE_TYPE.

            * gcc.dg/pr94705.c: New test.

    (cherry picked from commit e2a71816b4949225498bec37e947293aa7f5841b)

More information about the Gcc-bugs mailing list