From 609570b49e5b138416d6e46531586d4e93c6a429 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 9 Mar 2015 01:29:14 +0100 Subject: 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_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/ipa-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ipa-utils.h') diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index ea0f8b3..d302456 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -80,7 +80,7 @@ bool type_known_to_have_no_deriavations_p (tree); bool contains_polymorphic_type_p (const_tree); void register_odr_type (tree); bool types_must_be_same_for_odr (tree, tree); -bool types_odr_comparable (tree, tree); +bool types_odr_comparable (tree, tree, bool strict = false); cgraph_node *try_speculative_devirtualization (tree, HOST_WIDE_INT, ipa_polymorphic_call_context); -- cgit v1.1