aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-02-08 15:51:51 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2018-02-08 14:51:51 +0000
commit39aa9b2369eff7f2be0712ea7f1ee12f8697ce36 (patch)
tree09190fc346352b0770f0eab06a1b4031cf5bb35d /gcc/tree.c
parent84b4c7b593cd4ebb475a08aa4b816c722f716ce6 (diff)
downloadgcc-39aa9b2369eff7f2be0712ea7f1ee12f8697ce36.zip
gcc-39aa9b2369eff7f2be0712ea7f1ee12f8697ce36.tar.gz
gcc-39aa9b2369eff7f2be0712ea7f1ee12f8697ce36.tar.bz2
re PR ipa/81360 (ice in estimate_edge_growth, at ipa-inline.h:86)
PR ipa/81360 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare * symtab.c: Include builtins.h (symtab_node::output_to_lto_symbol_table_p): Move here from lto-streamer-out.c:output_symbol_p. * lto-streamer-out.c (write_symbol): Turn early exit to assert. (output_symbol_p): Move all logic to symtab.c (produce_symtab): Update. * lto.c (unify_scc): Register prevailing trees, not trees to be freed. (read_cgraph_and_symbols): Use symtab_node::output_to_lto_symbol_table_p. From-SVN: r257490
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index cd68fb5..63a29f4 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5329,6 +5329,16 @@ free_lang_data_in_decl (tree decl)
At this point, it is not needed anymore. */
DECL_SAVED_TREE (decl) = NULL_TREE;
+ /* Clear the abstract origin if it refers to a method.
+ Otherwise dwarf2out.c will ICE as we splice functions out of
+ TYPE_FIELDS and thus the origin will not be output
+ correctly. */
+ if (DECL_ABSTRACT_ORIGIN (decl)
+ && DECL_CONTEXT (DECL_ABSTRACT_ORIGIN (decl))
+ && RECORD_OR_UNION_TYPE_P
+ (DECL_CONTEXT (DECL_ABSTRACT_ORIGIN (decl))))
+ DECL_ABSTRACT_ORIGIN (decl) = NULL_TREE;
+
/* Sometimes the C++ frontend doesn't manage to transform a temporary
DECL_VINDEX referring to itself into a vtable slot number as it
should. Happens with functions that are copied and then forgotten