diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-03-09 01:29:14 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-03-09 00:29:14 +0000 |
commit | 609570b49e5b138416d6e46531586d4e93c6a429 (patch) | |
tree | 3c04ffdb9f015763faab98002b1a0ecd3eb1f2d7 /gcc/tree.h | |
parent | e1e8e374f4c3c2fbc4f2b420f5c966f61a65d610 (diff) | |
download | gcc-609570b49e5b138416d6e46531586d4e93c6a429.zip gcc-609570b49e5b138416d6e46531586d4e93c6a429.tar.gz gcc-609570b49e5b138416d6e46531586d4e93c6a429.tar.bz2 |
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
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4470,7 +4470,8 @@ extern tree block_ultimate_origin (const_tree); extern tree get_binfo_at_offset (tree, HOST_WIDE_INT, tree); extern bool virtual_method_call_p (tree); extern tree obj_type_ref_class (tree ref); -extern bool types_same_for_odr (const_tree type1, const_tree type2); +extern bool types_same_for_odr (const_tree type1, const_tree type2, + bool strict=false); extern bool contains_bitfld_component_ref_p (const_tree); extern bool type_in_anonymous_namespace_p (const_tree); extern bool block_may_fallthru (const_tree); |