re PR tree-optimization/86614 (duplicate -Warray-bounds for a strncpy call with...
authorJakub Jelinek <jakub@redhat.com>
Fri, 23 Nov 2018 09:12:16 +0000 (10:12 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 23 Nov 2018 09:12:16 +0000 (10:12 +0100)
commit21150aba6ac0b00ce22b01a8d6104e5ea4e7c6ec
treeae6888cf4f54bb5e51d98fccdefbd48761ace20a
parente0a35f9be5e08b33465999c90a0a3f09d4676da6
re PR tree-optimization/86614 (duplicate -Warray-bounds for a strncpy  call with out-of-bounds offset)

PR tree-optimization/86614
* gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
if TREE_NO_WARNING is set on ref.ref.

* c-c++-common/Warray-bounds-2.c (wrap_strncpy_dstarray_diff_neg,
call_strncpy_dstarray_diff_neg): Don't expect late -Warray-bounds
warnings, just early ones from FE.  Remove dg-prune-output.
* c-c++-common/Warray-bounds-6.c: New test.

From-SVN: r266403
gcc/ChangeLog
gcc/gimple-ssa-warn-restrict.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Warray-bounds-2.c
gcc/testsuite/c-c++-common/Warray-bounds-6.c [new file with mode: 0644]