Commit e67343d7 by David Malcolm Committed by David Malcolm

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
parent d22d74e0
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
......
......@@ -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");
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment