[Bug c++/104667] [10/11/12 Regression] ICE in is_late_template_attribute, at cp/decl2.cc:1299

2022-02-28 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104667

--- Comment #3 from CVS Commits  ---
The trunk branch has been updated by Marek Polacek :

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

commit r12-7412-gc8b0571e334792c0c789438617cfb7faf86ab599
Author: Marek Polacek 
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.

[Bug c++/104667] [10/11/12 Regression] ICE in is_late_template_attribute, at cp/decl2.cc:1299

2022-02-23 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104667

Marek Polacek  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
   Priority|P3  |P2
   Keywords||ice-on-valid-code
 Status|NEW |ASSIGNED

--- Comment #2 from Marek Polacek  ---
I think I have a fix.

[Bug c++/104667] [10/11/12 Regression] ICE in is_late_template_attribute, at cp/decl2.cc:1299

2022-02-23 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104667

Marek Polacek  changed:

   What|Removed |Added

   Last reconfirmed||2022-02-23
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |10.4
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed, started with r10-4929-g54aa6b58fe2fe73bbe67e0485777e0c410a18673