https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122992

--- Comment #24 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #23)
> (In reply to Drea Pinski from comment #22)
> > Note I am debugging the aarch64 bootstrap failure linked to this fix.
> > I hope to get some information on what was missed soon.
> 
> I think rtl-ssa/insns.cc change has a lifetime problem.
> 
> if FIRST_PSEUDO_REGISTER > HOST_BITS_PER_WIDEST_FAST_INT then
> EXECUTE_IF_SET_IN_HARD_REG_SET can't take a temporary as the lifetime of
> that temporary will end in some cases. `abi.full_reg_clobbers ()` returns a
> temporary.
> 
> Let me see if that fixes the problem with aarch64 bootstrap. It might also
> fixes the x86_64 issue too.

This is what I am testing:
```
[pinskia@cfarm185 gcc]$ git diff
diff --git a/gcc/rtl-ssa/insns.cc b/gcc/rtl-ssa/insns.cc
index fbd1fd9634a..6c8ccccc2b8 100644
--- a/gcc/rtl-ssa/insns.cc
+++ b/gcc/rtl-ssa/insns.cc
@@ -631,7 +631,8 @@ function_info::record_call_clobbers (build_info &bi,
insn_info *insn,
     {
       hard_reg_set_iterator hrsi;
       unsigned int regno = 0;
-      EXECUTE_IF_SET_IN_HARD_REG_SET (abi.full_reg_clobbers (), 0, regno,
hrsi)
+      auto hardset_full_reg_clobbers = abi.full_reg_clobbers ();
+      EXECUTE_IF_SET_IN_HARD_REG_SET (hardset_full_reg_clobbers, 0, regno,
hrsi)
        {
          def_info *def = m_defs[regno + 1];
          if (!def || def->last_def ()->insn () != insn)

```

If the bootstrap issue is resolved I will committ it as obvious.

Reply via email to