]> git.ipfire.org Git - thirdparty/gcc.git/commit
nds32: Avoid accessing beyond the operands[] array
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 21 May 2025 09:01:26 +0000 (10:01 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 21 May 2025 09:01:26 +0000 (10:01 +0100)
commita6ec398042c6054cbf2c08b646df98b63a9418d5
treec6af40d98a18603406418d35d185b1b5bcc0e23c
parent18df4a10bc96946401218019ec566d867238b3e4
nds32: Avoid accessing beyond the operands[] array

This pattern used operands[2] to hold the shift amount, even though
the pattern doesn't have an operand 2 (not even as a match_dup).
This caused a build failure with -Werror:

  array subscript 2 is above array bounds of ‘rtx_def* [2]’

gcc/
PR target/100837
* config/nds32/nds32-intrinsic.md (unspec_get_pending_int): Use
a local variable instead of operands[2].
gcc/config/nds32/nds32-intrinsic.md