[Bug ipa/87959] New: ICE in tree check: expected enumeral_type, have record_type in free_enum_values, at ipa-devirt.c:2265

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 9 12:38:00 GMT 2018


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

            Bug ID: 87959
           Summary: ICE in tree check: expected enumeral_type, have
                    record_type in free_enum_values, at ipa-devirt.c:2265
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

The ICE is as old as -Wodr warning:

$ cat a.ii
enum Type {};
void a(Type) {}

$ cat b.ii
struct Type;
void a(Type *) {}

$ g++ [ab].ii -flto 
a.ii:1:6: warning: type ‘Type’ violates the C++ One Definition Rule [-Wodr]
    1 | enum Type {};
      |      ^
lto1: note: a different type is defined in another translation unit
during IPA pass: pure-const
lto1: internal compiler error: tree check: expected enumeral_type, have
record_type in free_enum_values, at ipa-devirt.c:2265
0x6c9738 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        /home/marxin/Programming/gcc/gcc/tree.c:9623
0x800276 tree_check(tree_node*, char const*, int, char const*, tree_code)
        /home/marxin/Programming/gcc/gcc/tree.h:3154
0xa1f582 free_enum_values
        /home/marxin/Programming/gcc/gcc/ipa-devirt.c:2265
0xa1f5c5 build_type_inheritance_graph()
        /home/marxin/Programming/gcc/gcc/ipa-devirt.c:2281
0xa62bb2 symbol_table::remove_unreachable_nodes(_IO_FILE*)
        /home/marxin/Programming/gcc/gcc/ipa.c:310
0x79efb2 read_cgraph_and_symbols
        /home/marxin/Programming/gcc/gcc/lto/lto.c:3017
0x79efb2 lto_main()
        /home/marxin/Programming/gcc/gcc/lto/lto.c:3401


More information about the Gcc-bugs mailing list