On Tue, Feb 9, 2021 at 6:16 PM Martin Liška <mli...@suse.cz> wrote:
>
> The following fixes a memory leak.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?

OK.

Richard.

> Thanks,
> Martin
>
> gcc/ChangeLog:
>
>         PR tree-optimization/99002
>         * gimple-if-to-switch.cc (find_conditions): Fix memory leak
>         in the function.
> ---
>   gcc/gimple-if-to-switch.cc | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/gcc/gimple-if-to-switch.cc b/gcc/gimple-if-to-switch.cc
> index 1712fc4c8b3..f39662be3e6 100644
> --- a/gcc/gimple-if-to-switch.cc
> +++ b/gcc/gimple-if-to-switch.cc
> @@ -447,10 +447,9 @@ find_conditions (basic_block bb,
>         info->record_phi_mapping (info->m_false_edge,
>                                 &info->m_false_edge_phi_mapping);
>         conditions_in_bbs->put (bb, info);
> +      return;
>       }
>
> -  return;
> -
>   exit:
>     delete info;
>   }
> --
> 2.30.0
>

Reply via email to