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

            Bug ID: 113262
           Summary: ICE when using [[gnu::copy("")]] attribute
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

int[[gnu::copy("")]]a;

This crashes trunk GCC with the following error:

<source>:1:1: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'integer_type' in handle_copy_attribute, at
c-family/c-attribs.cc:3150
    1 | int[[gnu::copy("")]]a;
      | ^~~
0x232d4fc internal_error(char const*, ...)
        ???:0
0x87efb9 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ???:0
0x983af3 decl_attributes(tree_node**, tree_node*, int, tree_node*)
        ???:0
0x996328 finish_declspecs(c_declspecs*)
        ???:0
0xa1c31b c_parse_file()
        ???:0
0xa93da9 c_common_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1

Reply via email to