]> gcc.gnu.org Git - gcc.git/commit
Correct a workaround for vectorized stores.
authorMartin Sebor <msebor@redhat.com>
Wed, 3 Mar 2021 23:56:45 +0000 (16:56 -0700)
committerMartin Sebor <msebor@redhat.com>
Thu, 4 Mar 2021 00:04:48 +0000 (17:04 -0700)
commit8d57bdadd2d9c2e5c95515ca7a583d7b407b55c4
treec7dbd3442b2ad0a283689ae61e707540dd8bc34b
parent9a5a1e278f91fd7e67fdfbdb8d2f2f72dd566c99
Correct a workaround for vectorized stores.

Resolves:
PR middle-end/96963 - -Wstringop-overflow false positive with -ftree-vectorize when assigning consecutive char struct members
PR middle-end/94655 - -Wstringop-overflow on implicit string assignment with vectorized char store

gcc/ChangeLog:

PR middle-end/96963
PR middle-end/94655
* builtins.c (handle_array_ref): New helper.
(handle_mem_ref): New helper.
(compute_objsize_r): Factor out ARRAY_REF and MEM_REF handling
into new helper functions.  Correct a workaround for vectorized
assignments.

gcc/testsuite/ChangeLog:

PR middle-end/96963
PR middle-end/94655
* gcc.dg/Wstringop-overflow-47.c: Xfail tests.
* gcc.dg/Wstringop-overflow-65.c: New test.
* gcc.dg/Warray-bounds-69.c: Same.
gcc/builtins.c
gcc/testsuite/gcc.dg/Warray-bounds-69.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wstringop-overflow-47.c
gcc/testsuite/gcc.dg/Wstringop-overflow-65.c [new file with mode: 0644]
This page took 0.069951 seconds and 6 git commands to generate.