From: Jan Hubicka Date: Wed, 23 Oct 2019 19:03:42 +0000 (+0200) Subject: ipa-reference.c (varpool_removal_hook, [...]): Fix previous patch. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45012be1f5c7e6039e594bab41ebb94d89a9aca0;p=gcc.git ipa-reference.c (varpool_removal_hook, [...]): Fix previous patch. * ipa-reference.c (varpool_removal_hook, ipa_reference_c_finalize): Fix previous patch. From-SVN: r277347 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d68bc8a5524..d6c0c9ec6ee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-23 Jan Hubicka + + * ipa-reference.c (varpool_removal_hook, ipa_reference_c_finalize): Fix + previous patch. + 2019-10-23 Jan Hubicka * lto-streamer-out.c (output_constructor): Push CTORS_OUT timevar. diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index 1e35438bdd8..87d583fff0f 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -436,9 +436,7 @@ propagate_bits (ipa_reference_global_vars_info_t x_global, struct cgraph_node *x static void varpool_removal_hook (varpool_node *node, void *) { - int *id = ipa_reference_vars_map->get (node->decl) - if (id) - ipa_reference_vars_map->remove (*id); + ipa_reference_vars_map->remove (node->decl); } static bool ipa_init_p = false; @@ -1291,7 +1289,7 @@ ipa_reference_c_finalize (void) ipa_ref_opt_sum_summaries = NULL; delete ipa_reference_vars_map; ipa_reference_vars_map = NULL; - symtab->remove_varpool_removal_hook (varpool_node_hooks) + symtab->remove_varpool_removal_hook (varpool_node_hooks); } if (ipa_init_p)