https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128440

--- Comment #19 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by David Faust
<[email protected]>:

https://gcc.gnu.org/g:d32f1f0e642ed2eda1b979f8d565c62a972d5b9e

commit r14-13013-gd32f1f0e642ed2eda1b979f8d565c62a972d5b9e
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)

Reply via email to