https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128440
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by David Faust <[email protected]>: https://gcc.gnu.org/g:6838ac488a9dc8c912ae9bcd99e85d13a219f6b6 commit r17-5985-g6838ac488a9dc8c912ae9bcd99e85d13a219f6b6 Author: David Faust <[email protected]> Date: Thu Nov 5 11:15:28 2026 -0800 bpf: fix memmove backward loop offset [PR128440] The initial offset used for the backward loop when expanding memmove was wrong when moving chunks larger than 1 byte. Fix it by properly accounting for the increment size in the offset. Tested on x86_64-linux-gnu for bpf-unknown-none. Tested with Linux kernel bpf-next selftests. No changes. PR target/128440 gcc/ * config/bpf/bpf.cc (bpf_expand_cpymem): Fix offset used by the backward memmove loop. gcc/testsuite/ * gcc.target/bpf/memmove-3.c: New. * gcc.target/bpf/memmove-4.c: New. Suggested-by: Gabriel Ravier <[email protected]> Signed-off-by: David Faust <[email protected]>
