On Thu, Oct 10, 2019 at 9:21 PM Jan Hubicka <[email protected]> wrote:
>
> Hi,
> this patch fixes code removing summaries in ipa-reference. As a memory
> leak it may make sense to backport this to release branches.
Please do so.
Richard.
> Honza
>
> * ipa-reference.c (propagate): Fix releasing of IPA summaries.
> Index: ipa-reference.c
> ===================================================================
> --- ipa-reference.c (revision 276707)
> +++ ipa-reference.c (working copy)
> @@ -891,15 +889,14 @@ propagate (void)
>
> bitmap_obstack_release (&local_info_obstack);
>
> - if (ipa_ref_var_info_summaries == NULL)
> + if (ipa_ref_var_info_summaries != NULL)
> {
> delete ipa_ref_var_info_summaries;
> ipa_ref_var_info_summaries = NULL;
> }
>
> - ipa_ref_var_info_summaries = NULL;
> if (dump_file)
> splay_tree_delete (reference_vars_to_consider);
> reference_vars_to_consider = NULL;
> return remove_p ? TODO_remove_functions : 0;
> }