From: David Malcolm Date: Thu, 21 Jun 2018 13:44:38 +0000 (+0000) Subject: Fix IPA crash in libgccjit X-Git-Tag: upstream/12.2.0~30819 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e67343d7445768ef22523894ec589791f526234c;p=platform%2Fupstream%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 266ab55..8d6e648 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-06-21 David Malcolm + + * 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 PR tree-optimization/85859 diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index c192e84..42dd4cc 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -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"); diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index 9a9e94c..43bbdae 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -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);