re PR lto/65475 (ICE in odr_vtable_hasher::equal (Segmentation fault))
authorJan Hubicka <hubicka@ucw.cz>
Mon, 23 Mar 2015 00:17:07 +0000 (01:17 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 23 Mar 2015 00:17:07 +0000 (00:17 +0000)
commitb19058080955faaad5744d69288cb1de24078083
treeee6d9b6bb0477a6ca9579d2865403daaf915389e
parent67e00dabd9dc1a02cdbfcddd6e4619d69d214de7
re PR lto/65475 (ICE in odr_vtable_hasher::equal (Segmentation fault))

PR ipa/65475
* ipa-devirt.c: Include demangle.h
(odr_type_d): Add field rtti_broken.
(odr_subtypes_equivalent_p): Do not require name to match.
(compare_virtual_tables): Fix typo; if type already has ODR violation,
bypass the tests; be ready for function referneces in vtables that are
not DECL_VIRTUAL; make warnings to be OPT_Wodr.
(warn_odr): Give up for nameless types.
(warn_types_mismatch): Report mismatch in mangled names;
report mismatch in anonymous namespaces; look into component types to
give useful error; report when mismatch is dragged in from other ODR
type.
(odr_types_equivalent_p): Match types for being polymorphic; avoid
duplicated diagnostics.
(add_type_duplicate): Reorder checks so more informative ones come
first; fix typo; do not output "the extra base is defined here" when
we did not warn.
(BINFO_N_BASE_BINFOS): Relax sanity check.
* g++.dg/lto/pr65475b_0.C: New testcase.
* g++.dg/lto/pr65475b_1.C: New testcase.
* g++.dg/lto/pr65475c_0.C: New testcase.
* g++.dg/lto/pr65475c_1.C: New testcase.

From-SVN: r221582
gcc/ChangeLog
gcc/ipa-devirt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/pr65475b_0.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr65475b_1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr65475c_0.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr65475c_1.C [new file with mode: 0644]