diff options
author | Jan Hubicka <jh@suse.cz> | 2018-04-10 08:33:38 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2018-04-10 06:33:38 +0000 |
commit | c1b8f25d8090e778b330555005c81bc0c582a6b8 (patch) | |
tree | 7820fbe8f54a1910d5b3f0a145e1fea2b418a3e4 /gcc/ipa-devirt.c | |
parent | f518da46fbbdd79ab13417440198110dc9fc96d3 (diff) | |
download | gcc-c1b8f25d8090e778b330555005c81bc0c582a6b8.zip gcc-c1b8f25d8090e778b330555005c81bc0c582a6b8.tar.gz gcc-c1b8f25d8090e778b330555005c81bc0c582a6b8.tar.bz2 |
re PR lto/85078 (LTO ICE: tree check: expected tree that contains 'decl minimal' structure, have 'identifier_node' in decl_mangling_context, at cp/mangle.c:878)
PR lto/85078
* ipa-devirt.c (rebuild_type_inheritance-hash): New.
* ipa-utils.h (rebuild_type_inheritance-hash): Declare.
* tree.c (free_lang_data_in_type): Fix handling of binfos;
walk basetypes.
(free_lang_data): Rebuild type inheritance graph.
* g++.dg/torture/pr85078.C: New.
From-SVN: r259264
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r-- | gcc/ipa-devirt.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 30d3757..fa9380c 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -2702,6 +2702,24 @@ free_polymorphic_call_targets_hash () } } +/* Force rebuilding type inheritance graph from scratch. + This is use to make sure that we do not keep references to types + which was not visible to free_lang_data. */ + +void +rebuild_type_inheritance_graph () +{ + if (!odr_hash) + return; + delete odr_hash; + if (in_lto_p) + delete odr_vtable_hash; + odr_hash = NULL; + odr_vtable_hash = NULL; + odr_types_ptr = NULL; + free_polymorphic_call_targets_hash (); +} + /* When virtual function is removed, we may need to flush the cache. */ static void |