https://gcc.gnu.org/g:0f8ee5980094f46eb7ef6398beda7ffe125e7608
commit r17-6124-g0f8ee5980094f46eb7ef6398beda7ffe125e7608 Author: Stefan Schulze Frielinghaus <[email protected]> Date: Tue Nov 10 16:02:00 2026 +0100 final: Fix test_output_operand_modifier_operand For big-endian targets offset 0 for a subreg with outer QI mode and inner HI mode is invalid and leads to an ICE. Fixed by utilizing gen_lowpart_SUBREG which takes care of computing the correct offset which is for this particular case 1 for big-endian targets and 0 for little-endian targets. gcc/ChangeLog: * final.cc (test_output_operand_modifier_operand): Replace gen_rtx_SUBREG by gen_lowpart_SUBREG. Diff: --- gcc/final.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/final.cc b/gcc/final.cc index d20e0caa351e..224f0835a266 100644 --- a/gcc/final.cc +++ b/gcc/final.cc @@ -4795,7 +4795,7 @@ static void test_output_operand_modifier_operand () { rtx operands[] = { GEN_INT (10), - gen_rtx_SUBREG (QImode, gen_rtx_REG (HImode, 0), 0) }; + gen_lowpart_SUBREG (QImode, gen_rtx_REG (HImode, 0)) }; auto_vec<unsigned long, 2> opnums; opnums.safe_push (1); opnums.safe_push (0);
