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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:ca4b95069ca7dbf0be3a5aae053631e7a1b20103

commit r13-802-gca4b95069ca7dbf0be3a5aae053631e7a1b20103
Author: Marek Polacek <pola...@redhat.com>
Date:   Thu May 26 18:59:44 2022 -0400

    c-family: fix attribute constructor ICE [PR90658]

    Here the C compiler crashes because a FUNCTION_DECL got into
    get_priority -> default_conversion, and the C FE's version of d_c
    specifically asserts that it doesn't get a FUNCTION_DECL.  All uses
    of default_conversion in c-attribs.cc are guarded by != IDENTIFIER_NODE
    && != FUNCTION_DECL, but get_priority was only checking IDENTIFIER_NODE.

            PR c/90658

    gcc/c-family/ChangeLog:

            * c-attribs.cc (get_priority): Check FUNCTION_DECL.

    gcc/testsuite/ChangeLog:

            * c-c++-common/attr-cdtor-1.c: New test.

Reply via email to