[Bug middle-end/91977] missing -Wstringop-overflow on memcpy into a pointer plus offset

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 4 21:30:00 GMT 2019


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

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Fri Oct  4 21:29:41 2019
New Revision: 276603

URL: https://gcc.gnu.org/viewcvs?rev=276603&root=gcc&view=rev
Log:
PR middle-end/91977 - missing -Wstringop-overflow on memcpy into a pointer plus
offset

gcc/ChangeLog:

        PR middle-end/91977
        * tree-ssa-strlen.c (count_nonzero_bytes): Handle assignments with
        MEM_REF right operand.  Avoid failing for MEM_REF assignments from
        uninitialized objects.

gcc/testsuite/ChangeLog:

        PR middle-end/91977
        * gcc.dg/Wstringop-overflow-18.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/Wstringop-overflow-18.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/Warray-bounds-18.c
    trunk/gcc/tree-ssa-strlen.c


More information about the Gcc-bugs mailing list