PR middle-end/93829 - bogus -Wstringop-overflow on memcpy of a struct with a pointer...
authorMartin Sebor <msebor@redhat.com>
Mon, 2 Mar 2020 00:35:49 +0000 (17:35 -0700)
committerMartin Sebor <msebor@redhat.com>
Mon, 2 Mar 2020 00:35:49 +0000 (17:35 -0700)
commit1e9369c5dcf301e090d3a83e2c210cd6b96ac08c
treeffd4b9cd733424caaa4326de5dd1279eba7ca163
parent750d061df091da1eec2ee85e506d5291f7217ec9
PR middle-end/93829 - bogus -Wstringop-overflow on memcpy of a struct with a pointer member from another with a long string

gcc/testsuite/ChangeLog:

PR middle-end/93829
* gcc.dg/Wstringop-overflow-32.c: New test.

gcc/ChangeLog:

PR middle-end/93829
* tree-ssa-strlen.c (count_nonzero_bytes): Set the size to that
  of a pointer in the outermost ADDR_EXPRs.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wstringop-overflow-32.c [new file with mode: 0644]
gcc/tree-ssa-strlen.c