This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/65475] New: [5 Regression] ICE in odr_vtable_hasher::equal (Segmentation fault)


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

            Bug ID: 65475
           Summary: [5 Regression] ICE in odr_vtable_hasher::equal
                    (Segmentation fault)
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: hubicka at ucw dot cz
          Reporter: marxin at gcc dot gnu.org

Hi.

Following ICE can be seen in boost library:

$ g++ -O2 1.ii 2.ii -flto

1.ii:4:45: warning: type âstruct failureâ violates one definition rule [-Wodr]
   class __attribute((__abi_tag__("cxx11"))) failure : A {};
                                             ^
2.ii:4:45: note: a type with different virtual table pointers is defined in
another translation unit
   class __attribute((__abi_tag__("cxx11"))) failure {
                                             ^
1.ii:4:45: warning: type âstruct failureâ violates one definition rule [-Wodr]
   class __attribute((__abi_tag__("cxx11"))) failure : A {};
                                             ^
2.ii:4:45: note: a type with different bases is defined in another translation
unit
   class __attribute((__abi_tag__("cxx11"))) failure {
                                             ^
lto1: internal compiler error: Segmentation fault
0x9024df crash_signal
    ../../gcc/toplev.c:383
0x781cf1 odr_vtable_hasher::equal(odr_type_d const*, tree_node const*)
    ../../gcc/ipa-devirt.c:591
0x781cf1 hash_table<odr_vtable_hasher, xcallocator,
false>::find_slot_with_hash(tree_node const*, unsigned int, insert_option)
    ../../gcc/hash-table.h:981
0x77b9bd get_odr_type(tree_node*, bool)
    ../../gcc/ipa-devirt.c:1717
0x77d32c register_odr_type(tree_node*)
    ../../gcc/ipa-devirt.c:1839
0x5b4566 lto_read_decls
    ../../gcc/lto/lto.c:1946
0x5b4f0b lto_file_finalize
    ../../gcc/lto/lto.c:2236
0x5b4f0b lto_create_files_from_ids
    ../../gcc/lto/lto.c:2246
0x5b4f0b lto_file_read
    ../../gcc/lto/lto.c:2287
0x5b4f0b read_cgraph_and_symbols
    ../../gcc/lto/lto.c:2992
0x5b4f0b lto_main()
    ../../gcc/lto/lto.c:3462

$ cat 1.ii
namespace std {
class ios_base {
  struct A {};
  class __attribute((__abi_tag__("cxx11"))) failure : A {};
} a;
}


$ cat 2.ii
namespace std {
template <typename, typename = int> class Trans_NS___cxx11_basic_ostringstream;
class ios_base {
  class __attribute((__abi_tag__("cxx11"))) failure {
    virtual char m_fn2();
  };
};
class B : virtual ios_base {};
template <typename, typename> class Trans_NS___cxx11_basic_ostringstream : B {
public:
  void m_fn1();
};
}

class A {
public:
  A(int) {
    std::Trans_NS___cxx11_basic_ostringstream<wchar_t> a;
    a.m_fn1();
  }
};
int b;
void fn1() { (A(b)); }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]