re PR lto/65316 (LTO: Uninitialized memory / ICE with -g -fno-lto-odr-type-merging...
authorJan Hubicka <hubicka@ucw.cz>
Mon, 9 Mar 2015 00:29:14 +0000 (01:29 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 9 Mar 2015 00:29:14 +0000 (00:29 +0000)
commit609570b49e5b138416d6e46531586d4e93c6a429
tree3c04ffdb9f015763faab98002b1a0ecd3eb1f2d7
parente1e8e374f4c3c2fbc4f2b420f5c966f61a65d610
re PR lto/65316 (LTO: Uninitialized memory / ICE with -g -fno-lto-odr-type-merging: in types_same_for_odr, at ipa-devirt.c:465)

PR lto/65316
* ipa-utils.h (types_odr_comparable): Add strict argument.
* ipa-devirt.c: Fix whitespace;
(odr_hasher): Remove.
(odr_name_hasher, odr_vtable_hasher): New hashers.
(can_be_name_hashed_p): New predicate.
(hash_type_name): remove.
(hash_odr_name): New.
(odr_name_hasher::hash): new.
(can_be_vtable_hashed_p): New.
(hash_odr_vtable): New.
(odr_vtable_hasher::hash): New.
(types_same_for_odr): Add strict parameter.
(types_odr_comparable): Likewise.
(odr_name_hasher::equal): New.
(odr_vtable_hasher::equal): New.
(odr_name_hasher::remove): New.
(odr_hash_type): Change to hash_table<odr_name_hasher>.
(odr_vtable_hash_type): New.
(odr_vtable_hash): New.
(odr_subtypes_equivalent_p): Do strict comparsion.
(add_type_duplicate): Merge type names; cleanup; avoid type
duplicates.
(register_odr_type): Initialize vtable hash.
(build_type_inheritance_graph): Likewise
(get_odr_type): Reorg to use two hashes.
(dump_possible_polymorphic_call_targets): Move sanity check after debug
output.
(ipa_devirt): Dump type_inheritance_graph.
(types_same_for_odr): Add strict mode.
* g++.dg/lto/pr65316_0.C: New testcase.
* g++.dg/lto/pr65316_1.C: New testcase.

From-SVN: r221275
gcc/ChangeLog
gcc/ipa-devirt.c
gcc/ipa-utils.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/pr65316_0.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr65316_1.C [new file with mode: 0644]
gcc/tree.h