Fix IPA crash in libgccjit

gcc/ChangeLog:
	* ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
	deleting it.
	* ipa-reference.c (ipa_reference_c_finalize): Delete
	ipa_ref_opt_sum_summaries and set it to NULL.

From-SVN: r261846
This commit is contained in:
David Malcolm 2018-06-21 13:44:38 +00:00 committed by David Malcolm
parent d22d74e09d
commit e67343d744
3 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2018-06-21 David Malcolm <dmalcolm@redhat.com>
* ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
deleting it.
* ipa-reference.c (ipa_reference_c_finalize): Delete
ipa_ref_opt_sum_summaries and set it to NULL.
2018-06-21 Tom de Vries <tdevries@suse.de>
PR tree-optimization/85859

View File

@ -5089,6 +5089,7 @@ ipcp_driver (void)
/* Free all IPCP structures. */
free_toporder_info (&topo);
delete edge_clone_summaries;
edge_clone_summaries = NULL;
ipa_free_all_structures_after_ipa_cp ();
if (dump_file)
fprintf (dump_file, "\nIPA constant propagation end\n");

View File

@ -1230,6 +1230,12 @@ make_pass_ipa_reference (gcc::context *ctxt)
void
ipa_reference_c_finalize (void)
{
if (ipa_ref_opt_sum_summaries != NULL)
{
delete ipa_ref_opt_sum_summaries;
ipa_ref_opt_sum_summaries = NULL;
}
if (ipa_init_p)
{
bitmap_obstack_release (&optimization_summary_obstack);