On Mon, Jun 14, 2021 at 4:17 PM Seija K. via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> This is a patch to fix BUG 87162 by returning false if cfg is null.

I suppose OK since TM isn't really maintained - but the actual bug is that
this pass does work in its gate function rather than in ::execute ()

Richard.

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87162
>
> diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
> index 1d4eb80620295..326e1c412465b 100644
> --- a/gcc/trans-mem.c
> +++ b/gcc/trans-mem.c
> @@ -2099,6 +2099,9 @@ gate_tm_init (void)
>    if (!flag_tm)
>      return false;
>
> +  if (!cfun->cfg)
> +    return false;
> +
>    calculate_dominance_info (CDI_DOMINATORS);
>    bitmap_obstack_initialize (&tm_obstack);

Reply via email to