https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99314
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Kito Cheng <k...@gcc.gnu.org>: https://gcc.gnu.org/g:f26015ef086f68d55f1f2ae293a99d5ad3736795 commit r10-9456-gf26015ef086f68d55f1f2ae293a99d5ad3736795 Author: Sinan Lin <si...@isrc.iscas.ac.cn> Date: Thu Mar 4 18:02:39 2021 +0800 PR target/99314: Fix integer signedness issue for cpymem pattern expansion. Third operand of cpymem pattern is unsigned HOST_WIDE_INT, however we are interpret that as signed HOST_WIDE_INT, that not a problem in most case, but when the value is large than signed HOST_WIDE_INT, it might screw up since we have using that value to calculate the buffer size. 2021-03-05 Sinan Lin <si...@isrc.iscas.ac.cn> Kito Cheng <kito.ch...@sifive.com> gcc/ChangeLog: * config/riscv/riscv.c (riscv_block_move_straight): Change type to unsigned HOST_WIDE_INT for parameter and local variable with HOST_WIDE_INT type. (riscv_adjust_block_mem): Ditto. (riscv_block_move_loop): Ditto. (riscv_expand_block_move): Ditto. (cherry picked from commit d9f0ade001533c9544bf2153b6baa8844ec0bee4)