re PR ipa/87957 (ICE tree check: expected tree that contains ‘decl minimal’ structure...
authorJan Hubicka <jh@suse.cz>
Wed, 21 Nov 2018 17:31:19 +0000 (18:31 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 21 Nov 2018 17:31:19 +0000 (17:31 +0000)
commit7424b7c13940c36700db8cd19a6f16d75af07b50
tree10c9100455747cf530c2ad6daaba7cbfcdb02bab
parent6bdb055ea850bb5497e52b5b1acbd8dabe93e01f
re PR ipa/87957 (ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘identifier_node’ in warn_odr, at ipa-devirt.c:1051 since r265519)

PR lto/87957
* tree.c (fld_decl_context): Break out from ...
(free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
(fld_incomplete_type_of): Build copy of TYP_DECL.
* ipa-devirt.c (free_enum_values): Rename to ...
(free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
and TREE_TYPEs of TYPE_DECLs.
(get_odr_type): Initialize odr_vtable_hash if needed.

From-SVN: r266350
gcc/ChangeLog
gcc/ipa-devirt.c
gcc/tree.c