[Bug ipa/92609] New: [10 Regression] ICE in warn_types_mismatch, at ipa-devirt.c:1000 since r265519

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 21 08:59:00 GMT 2019


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

            Bug ID: 92609
           Summary: [10 Regression] ICE in warn_types_mismatch, at
                    ipa-devirt.c:1000 since r265519
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 47318
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47318&action=edit
test-case

Since the mentioned revision, the following is failing:

$ g++ -flto=auto -Wodr 1.ii 2.ii
1.ii:68:7: warning: type ‘struct OpenGLText’ violates the C++ One Definition
Rule [-Wodr]
   68 | class OpenGLText {
      |       ^
2.ii:48:7: note: a different type is defined in another translation unit
   48 | class OpenGLText {
      |       ^
1.ii:75:7: note: the first difference of corresponding definitions is field
‘glyphs’
   75 |   int glyphs;
      |       ^
2.ii:55:12: note: a field of same name but different type is defined in another
translation unit
   55 |   glyphMap glyphs;
      |            ^
lto1: internal compiler error: in warn_types_mismatch, at ipa-devirt.c:1000
0x633bb1 warn_types_mismatch(tree_node*, tree_node*, unsigned int, unsigned
int)
        /home/marxin/Programming/gcc/gcc/ipa-devirt.c:1000
0xa9f4ae odr_types_equivalent_p
        /home/marxin/Programming/gcc/gcc/ipa-devirt.c:1477
0xa9f4ae odr_types_equivalent_p
        /home/marxin/Programming/gcc/gcc/ipa-devirt.c:1178
0xa9bf02 add_type_duplicate
        /home/marxin/Programming/gcc/gcc/ipa-devirt.c:1767
0xa9bf02 get_odr_type(tree_node*, bool)
        /home/marxin/Programming/gcc/gcc/ipa-devirt.c:1929
0xaa0699 register_odr_type(tree_node*)
        /home/marxin/Programming/gcc/gcc/ipa-devirt.c:2086
0x809037 lto_read_decls
        /home/marxin/Programming/gcc/gcc/lto/lto-common.c:1898
0x80a9c5 lto_file_finalize
        /home/marxin/Programming/gcc/gcc/lto/lto-common.c:2227
0x80a9c5 lto_create_files_from_ids
        /home/marxin/Programming/gcc/gcc/lto/lto-common.c:2237
0x80a9c5 lto_file_read
        /home/marxin/Programming/gcc/gcc/lto/lto-common.c:2292
0x80a9c5 read_cgraph_and_symbols(unsigned int, char const**)
        /home/marxin/Programming/gcc/gcc/lto/lto-common.c:2744
0x7f1e22 lto_main()
        /home/marxin/Programming/gcc/gcc/lto/lto.c:629
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status


More information about the Gcc-bugs mailing list