+2015-02-28 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/65232
+ * ipa-icf.c (clear_decl_rtl): New function.
+ (sem_function::merge): Clear RTL before forming alias.
+ (sem_variable::merge): Clear RTL before forming alias.
+
2015-02-28 Jan Hubicka <hubicka@ucw.cz>
PR ipa/65236
return false;
}
-/* TREE_ADDRESSABLE of NODE to true if DATA is non-NULL.
+/* TREE_ADDRESSABLE of NODE to true.
Helper for call_for_symbol_thunks_and_aliases. */
static bool
return false;
}
+/* Clear DECL_RTL of NODE.
+ Helper for call_for_symbol_thunks_and_aliases. */
+
+static bool
+clear_decl_rtl (symtab_node *node, void *)
+{
+ SET_DECL_RTL (node->decl, NULL);
+ return false;
+}
+
/* Redirect all callers of N and its aliases to TO. Remove aliases if
possible. Return number of redirections made. */
ipa_merge_profiles (original, alias);
alias->release_body (true);
alias->reset ();
+ /* Notice global symbol possibly produced RTL. */
+ ((symtab_node *)alias)->call_for_symbol_and_aliases (clear_decl_rtl,
+ NULL, true);
/* Create the alias. */
cgraph_node::create_alias (alias_func->decl, decl);
alias->analyzed = false;
DECL_INITIAL (alias->decl) = NULL;
+ ((symtab_node *)alias)->call_for_symbol_and_aliases (clear_decl_rtl,
+ NULL, true);
alias->need_bounds_init = false;
alias->remove_all_references ();
if (TREE_ADDRESSABLE (alias->decl))