PR tree-optimization/84047 - missing -Warray-bounds on an out-of-bounds index into...
commita927d2943917024a2a71cc83583d3235f79f8b65
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Jul 2018 23:36:34 +0000 (19 23:36 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Jul 2018 23:36:34 +0000 (19 23:36 +0000)
treec7d999063b4f24555814611b02dd940e42314cd4
parentf3c335607cb37e5ad248e117ddb1c8adbed756fd
PR tree-optimization/84047 - missing -Warray-bounds on an out-of-bounds index into an array
PR tree-optimization/83776 - missing -Warray-bounds indexing past the end of a string literal

gcc/ChangeLog:

PR tree-optimization/84047
PR tree-optimization/83776
* tree-vrp.c (vrp_prop::check_mem_ref): New function.
(check_array_bounds): Call it.

gcc/testsuite/ChangeLog:

PR tree-optimization/83776
PR tree-optimization/84047
* gcc.dg/Warray-bounds-29.c: New test.
* gcc.dg/Warray-bounds-30.c: New test.
* gcc.dg/Warray-bounds-31.c: New test.
* gcc.dg/Warray-bounds-32.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262893 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Warray-bounds-29.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Warray-bounds-30.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Warray-bounds-31.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Warray-bounds-32.c [new file with mode: 0644]
gcc/tree-vrp.c