diff options
author | Martin Sebor <msebor@redhat.com> | 2019-02-11 17:44:05 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2019-02-11 10:44:05 -0700 |
commit | 287ef129b68d25d219b167163a2494d82bee5820 (patch) | |
tree | cdd2b8ec87767d99ab4bcddece5ee1e1a452fe6f /libcpp | |
parent | 28a8cef1e240989c199dfd8538c826c134098f85 (diff) | |
download | gcc-287ef129b68d25d219b167163a2494d82bee5820.zip gcc-287ef129b68d25d219b167163a2494d82bee5820.tar.gz gcc-287ef129b68d25d219b167163a2494d82bee5820.tar.bz2 |
PR tree-optimization/88771 - Misleading -Werror=array-bounds error
gcc/ChangeLog:
PR tree-optimization/88771
* gimple-ssa-warn-restrict.c (pass_wrestrict::gate): Also enable
when -Wstringop-overflow is set.
(builtin_memref::builtin_memref): Adjust excessive upper bound
only when lower bound is not excessive.
(maybe_diag_overlap): Detect and diagnose excessive bounds via
-Wstringop-ovefflow.
(maybe_diag_offset_bounds): Rename...
(maybe_diag_access_bounds): ...to this.
(check_bounds_or_overlap): Adjust for name change above.
gcc/testsuite/ChangeLog:
PR tree-optimization/88771
* gcc.dg/Wstringop-overflow-8.c: New test.
* gcc.dg/Wstringop-overflow-9.c: New test.
* gcc.dg/Warray-bounds-40.c: New test.
* gcc.dg/builtin-stpncpy.c: Adjust.
* gcc.dg/builtin-stringop-chk-4.c: Adjust.
* g++.dg/opt/memcpy1.C: Adjust.
From-SVN: r268775
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions