aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-10-01 15:03:19 +0200
committerJan Hubicka <jh@suse.cz>2020-10-01 15:03:19 +0200
commitbc2fcccd9d5cc9d346543a98c98dc00d71e9a5b8 (patch)
treebe417efb9b3e9e5376741a893fbefa4c44ba938a /gcc/ipa-prop.c
parentba663ac1b1add0f1625862166a946fcb583d3686 (diff)
downloadgcc-bc2fcccd9d5cc9d346543a98c98dc00d71e9a5b8.zip
gcc-bc2fcccd9d5cc9d346543a98c98dc00d71e9a5b8.tar.gz
gcc-bc2fcccd9d5cc9d346543a98c98dc00d71e9a5b8.tar.bz2
Fix ICE in ipa_edge_args_sum_t::duplicate
PR ipa/97244 * ipa-fnsummary.c (pass_free_fnsummary::execute): Free also indirect inlining datastructure. * ipa-modref.c (pass_ipa_modref::execute): Do not free them here. * ipa-prop.c (ipa_free_all_node_params): Do not crash when info does not exist. (ipa_unregister_cgraph_hooks): Likewise.
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index b28c78e..ea88fd3 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -4124,7 +4124,8 @@ ipa_free_all_edge_args (void)
void
ipa_free_all_node_params (void)
{
- ggc_delete (ipa_node_params_sum);
+ if (ipa_node_params_sum)
+ ggc_delete (ipa_node_params_sum);
ipa_node_params_sum = NULL;
}
@@ -4368,7 +4369,8 @@ ipa_register_cgraph_hooks (void)
static void
ipa_unregister_cgraph_hooks (void)
{
- symtab->remove_cgraph_insertion_hook (function_insertion_hook_holder);
+ if (function_insertion_hook_holder)
+ symtab->remove_cgraph_insertion_hook (function_insertion_hook_holder);
function_insertion_hook_holder = NULL;
}