вт, 22 окт. 2024 г. в 14:19, Georg-Johann Lay <a...@gjlay.de>: > > This patch is a 2nd take on fixing PR116953: > > The output function for avr_out_sbxx_branch() runs > jump_over_one_insn_p() which calls extract for the next insn, which > clobbers recog_data. The previous fix makes local copy of the input > operands[] to avr_out_sbxx_branch() -- which is recog_data.operand. > However, avr_out_sbxx_branch() may also return asm output template > code with %-operands, so that recog_data is referred to elsewhere, > like in print_operand. > > The attached fix reverts that and just extracts the current insn's > operands and stuff again. > > Unfortunately I don't have a test case for this; I came across > it when working on some feature patch. > > Ok for trunk and releases/gcc-14 ? (Which have the previous fix).
Ok. Please apply. Denis. > > Johann > > -- > > AVR: target/116953 - Restore recog_data after calling jump_over_one_insn_p. > > The previous fix for PR116953 is incomplete because references to > recog_data are escaping avr_out_sbxx_branch() in the form of %-operands > in the returned asm code template. This patch reverts the previous fix, > and re-extracts the operands by means of extract_constrain_insn_cached() > after the call of jump_over_one_insn_p(). > > PR target/116953 > gcc/ > * config/avr/avr.cc (avr_out_sbxx_branch): Revert previous fix > for PR116953 (r15-4078). Run extract_constrain_insn_cached > on the current insn after calling jump_over_one_insn_p.