PR tree-optimization/89720 - Spurious -Warray-bounds warning on a range with max...
authorMartin Sebor <msebor@redhat.com>
Mon, 18 Mar 2019 23:48:50 +0000 (23:48 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Mon, 18 Mar 2019 23:48:50 +0000 (17:48 -0600)
commitc46c9745aaa1a6e7df1d2421ad906d2a6a30d465
tree1e375010fc08fedcfa5a5fce2bf640b561071291
parenteea4e2ff0a3f5e7f37df204c070cc5d9ef339e6e
PR tree-optimization/89720 - Spurious -Warray-bounds warning on a range with max < min

gcc/ChangeLog:

PR tree-optimization/89720
* tree-vrp.c (vrp_prop::check_mem_ref): Treat range with max < min
more conservatively, the same as anti-range.

gcc/testsuite/ChangeLog:

PR tree-optimization/89720
* gcc.dg/Warray-bounds-42.c: New test.

From-SVN: r269785
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Warray-bounds-42.c [new file with mode: 0644]
gcc/tree-vrp.c