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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-04-08
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code
          Component|c                           |c++
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Seems when we call this 'e' doesn't have a type and we crash:

  if (DECL_P (node))
    {
      attrs[0] = DECL_ATTRIBUTES (node);
      attrs[1] = TYPE_ATTRIBUTES (TREE_TYPE (node));

I suppose

  if ((code == FUNCTION_DECL && !excl->function
       && (!excl->type || !spec->affects_type_identity))
      || (code == VAR_DECL && !excl->variable
          && (!excl->type || !spec->affects_type_identity))
      || (((code == TYPE_DECL || RECORD_OR_UNION_TYPE_P (node)) &&
!excl->type)))
    return false;

could add || (code != FUNCTION_DECL && code != VAR_DECL && code != TYPE_DECL)

Reply via email to