From: Richard Sandiford Date: Wed, 21 May 2025 09:01:26 +0000 (+0100) Subject: xstormy16: Avoid accessing beyond the operands[] array X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=856f6de5d19257e3c5802a250e7c749ca44beee3;p=thirdparty%2Fgcc.git xstormy16: Avoid accessing beyond the operands[] array The negsi2 C++ code writes to operands[2] even though the pattern has no operand 2. gcc/ * config/stormy16/stormy16.md (negsi2): Remove unused assignment. --- diff --git a/gcc/config/stormy16/stormy16.md b/gcc/config/stormy16/stormy16.md index 70c82827a4a..15c60ad0388 100644 --- a/gcc/config/stormy16/stormy16.md +++ b/gcc/config/stormy16/stormy16.md @@ -702,8 +702,7 @@ [(parallel [(set (match_operand:SI 0 "register_operand" "") (neg:SI (match_operand:SI 1 "register_operand" ""))) (clobber (reg:BI CARRY_REG))])] - "" - { operands[2] = gen_reg_rtx (HImode); }) + "") (define_insn_and_split "*negsi2_internal" [(set (match_operand:SI 0 "register_operand" "=&r")