On Thu, Jul 24, 2025 at 12:03:43PM +0200, Stefan Schulze Frielinghaus wrote: > It looks like we didn't have a test so far reaching this point which > changed with the new hard register constraint tests. Bootstrap and > regtest are still running on x86_64. If they succeed, ok for mainline?
Meanwhile both finished successfully. > > -- >8 -- > > As noted by Sam in the PR, with checking enabled tests > gcc.target/i386/asm-hard-reg-{1,2}.c fail with an ICE. If an error is > detected in curr_insn_transform(), lra_asm_insn_error() is called and > deletes the current insn. However, afterwards processing continues with > the deleted insn and via lra_process_new_insns() we finally call recog() > for NOTE_INSN_DELETED which ICEs in case of a checking build. Thus, in > case of an error during curr_insn_transform() bail out and stop > processing. > > gcc/ChangeLog: > > PR rtl-optimization/121205 > * lra-constraints.cc (curr_insn_transform): Stop processing on > error. > --- > gcc/lra-constraints.cc | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/gcc/lra-constraints.cc b/gcc/lra-constraints.cc > index 83f8fda3b52..dc3c224a097 100644 > --- a/gcc/lra-constraints.cc > +++ b/gcc/lra-constraints.cc > @@ -4929,7 +4929,10 @@ curr_insn_transform (bool check_only_p) > if (asm_noperands (PATTERN (curr_insn)) >= 0 > && ++curr_id->asm_reloads_num >= FIRST_PSEUDO_REGISTER) > /* Most probably there are no enough registers to satisfy asm insn: */ > - lra_asm_insn_error (curr_insn); > + { > + lra_asm_insn_error (curr_insn); > + return change_p; > + } > } > if (goal_alt_out_sp_reload_p) > { > -- > 2.49.0 >