@@ -4680,6 +4680,8 @@ public:
virtual unsigned int execute (function *)
{
ipa_free_fn_summary ();
+ /* Free ipa-prop structures if they are no longer needed. */
+ ipa_free_all_structures_after_iinln ();
if (!flag_wpa)
ipa_free_size_summary ();
return 0;
@@ -1681,8 +1681,6 @@ pass_ipa_modref::execute (function *)
}
((modref_summaries *)summaries)->ipa = false;
ipa_free_postorder_info ();
- /* Free ipa-prop structures if they are no longer needed. */
- ipa_free_all_structures_after_iinln ();
return 0;
}
@@ -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;
}
@@ -1,7 +1,7 @@
/* Verify that indirect inlining can also remove references of the functions it
discovers calls for. */
/* { dg-do compile } */
-/* { dg-options "-O3 -fno-early-inlining -fno-ipa-cp -fdump-ipa-inline -fdump-tree-optimized -fno-ipa-icf" } */
+/* { dg-options "-O3 -fno-early-inlining -fno-ipa-cp -fdump-ipa-inline -fdump-tree-optimized -fno-ipa-icf -fno-ipa-modref" } */
int global;