re PR tree-optimization/64277 (Incorrect warning "array subscript is above array...
authorRichard Biener <rguenther@suse.de>
Thu, 16 Apr 2015 12:03:11 +0000 (12:03 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 16 Apr 2015 12:03:11 +0000 (12:03 +0000)
commitf8269ad4a97c7a4c950fcf42de24d6f145037e7e
treecf69ae8eeed6f2f7cfd0cbe284c8dd255c21717f
parent579cef8f39ea28afa93c2d84f959867a7caa1325
re PR tree-optimization/64277 (Incorrect warning "array subscript is above array bounds")

2015-04-16  Richard Biener  <rguenther@suse.de>

PR tree-optimization/64277
* tree-vrp.c (check_array_ref): Fix anti-range handling,
simplify upper bound handling.
(search_for_addr_array): Simplify.
(check_array_bounds): Handle ADDR_EXPRs here.
(check_all_array_refs): Simplify.

* gcc.dg/Warray-bounds-14.c: New testcase.
* gcc.dg/Warray-bounds-15.c: Likewise.
* c-c++-common/ubsan/bounds-4.c: Disable -Warray-bounds.
* c-c++-common/ubsan/bounds-6.c: Likewise.

From-SVN: r222146
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/bounds-4.c
gcc/testsuite/c-c++-common/ubsan/bounds-6.c
gcc/testsuite/gcc.dg/Warray-bounds-14.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Warray-bounds-15.c [new file with mode: 0644]
gcc/tree-vrp.c