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

            Bug ID: 107993
           Summary: ICE: tree check: expected string_cst, have integer_cst
                    in get_target_clone_attr_len, at tree.cc:14872
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started with r6 :
(gcc configured with --enable-checking=yes)


$ cat z1.c
typedef union {} u;
__attribute__((target_clones("arch=alderlake",!"default")))
int f (u *x) {}


$ gcc-13-20221204 -c z1.c
z1.c:3:1: internal compiler error: tree check: expected string_cst, have
integer_cst in get_target_clone_attr_len, at tree.cc:14872
    3 | int f (u *x) {}
      | ^~~
0x6b3c56 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.cc:8822
0x121b83e tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc/tree.h:3528
0x121b83e get_target_clone_attr_len(tree_node*)
        ../../gcc/tree.cc:14872
0x8fbf87 handle_target_clones_attribute
        ../../gcc/c-family/c-attribs.cc:5594
0x7b4a87 decl_attributes(tree_node**, tree_node*, int, tree_node*)
        ../../gcc/attribs.cc:878
0x7db93d start_function(c_declspecs*, c_declarator*, tree_node*)
        ../../gcc/c/c-decl.cc:10089
0x852e8e c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.cc:2751
0x85e30f c_parser_external_declaration
        ../../gcc/c/c-parser.cc:1925
0x85ec4d c_parser_translation_unit
        ../../gcc/c/c-parser.cc:1779
0x85ec4d c_parse_file()
        ../../gcc/c/c-parser.cc:24596
0x8d85e1 c_common_parse_file()
        ../../gcc/c-family/c-opts.cc:1248

Reply via email to