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

            Bug ID: 89685
           Summary: [9 Regression] ICE: tree check: expected class 'type',
                    have 'expression' (compound_expr) in
                    diag_attr_exclusions, at attribs.c:396
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Changed between 20181104 and 20181111 :


$ cat z1.c
struct __attribute__((packed)) A {};
struct B { __attribute__((copy ((struct A *) (0, 1)))) int c; };


$ gcc-9-20190310 -c z1.c
z1.c:2:33: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
    2 | struct B { __attribute__((copy ((struct A *) (0, 1)))) int c; };
      |                                 ^
z1.c:2:41: internal compiler error: tree check: expected class 'type', have
'expression' (compound_expr) in diag_attr_exclusions, at attribs.c:396
    2 | struct B { __attribute__((copy ((struct A *) (0, 1)))) int c; };
      |                                         ^
0x5cf8ca tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/tree.c:9907
0x5fc44d tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        ../../gcc/tree.h:3299
0x5fc44d diag_attr_exclusions
        ../../gcc/attribs.c:396
0x5fc349 diag_attr_exclusions
        ../../gcc/attribs.c:379
0x5fe6b8 decl_attributes(tree_node**, tree_node*, int, tree_node*)
        ../../gcc/attribs.c:698
0x7113c8 handle_copy_attribute
        ../../gcc/c-family/c-attribs.c:2524
0x5fe732 decl_attributes(tree_node**, tree_node*, int, tree_node*)
        ../../gcc/attribs.c:719
0x679197 c_parser_struct_declaration
        ../../gcc/c/c-parser.c:3415
0x66fc1f c_parser_struct_or_union_specifier
        ../../gcc/c/c-parser.c:3217
0x66fc1f c_parser_declspecs(c_parser*, c_declspecs*, bool, bool, bool, bool,
bool, c_lookahead_kind)
        ../../gcc/c/c-parser.c:2796
0x6881f8 c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.c:1850
0x691dc3 c_parser_external_declaration
        ../../gcc/c/c-parser.c:1653
0x692889 c_parser_translation_unit
        ../../gcc/c/c-parser.c:1534
0x692889 c_parse_file()
        ../../gcc/c/c-parser.c:19854
0x6f2890 c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1155

Reply via email to