https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128440
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by David Faust <[email protected]>: https://gcc.gnu.org/g:6805a5b072a8bfc347225165ad4d55fa134ab4fe commit r16-9899-g6805a5b072a8bfc347225165ad4d55fa134ab4fe 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]> (cherry picked from commit 6838ac488a9dc8c912ae9bcd99e85d13a219f6b6)
