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

--- Comment #3 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:c8b0571e334792c0c789438617cfb7faf86ab599

commit r12-7412-gc8b0571e334792c0c789438617cfb7faf86ab599
Author: Marek Polacek <pola...@redhat.com>
Date:   Thu Feb 24 16:41:53 2022 -0500

    c++: ICE with attribute on enumerator [PR104667]

    When processing a template, the enumerators we build don't have a type
    yet.  But is_late_template_attribute is not prepared to see a _DECL
    without a type, so we crash on

      enum tree_code code = TREE_CODE (type);

    (I found that we don't give the "is deprecated" warning for the enumerator
    'f' in the test.  Reported as PR104682.)

            PR c++/104667

    gcc/cp/ChangeLog:

            * decl2.cc (is_late_template_attribute): Cope with a decl without
            a type.

    gcc/testsuite/ChangeLog:

            * g++.dg/ext/attrib64.C: New test.

Reply via email to