PR tree-optimization/82588 - missing -Warray-bounds on a excessively large index
authorMartin Sebor <msebor@redhat.com>
Thu, 16 Nov 2017 16:12:36 +0000 (16:12 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Thu, 16 Nov 2017 16:12:36 +0000 (09:12 -0700)
commit8a5ee94a082b3d485b5cf7acc2b40b26cccb129f
tree08a6c6319b08277f262d9f9a882dfbaa10a55ede
parent79cefe9d7d04cb9634ebfca6dec5f7c22c1104e3
PR tree-optimization/82588 - missing -Warray-bounds on a excessively large index

PR tree-optimization/82588 - missing -Warray-bounds on a excessively large index
PR tree-optimization/82583 - missing -Warray-bounds on out-of-bounds inner indic

gcc/ChangeLog:

PR tree-optimization/82588
PR tree-optimization/82583
* tree-vrp.c (check_array_ref): Handle flexible array members,
string literals, and inner indices.
(search_for_addr_array): Add detail to diagnostics.

gcc/testsuite/ChangeLog:

PR tree-optimization/82588
PR tree-optimization/82583
* c-c++-common/Warray-bounds.c: New test.
* gcc.dg/Warray-bounds-11.c: Adjust.
* gcc.dg/Warray-bounds-22.c: New test.

From-SVN: r254830
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Warray-bounds.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Warray-bounds-11.c
gcc/testsuite/gcc.dg/Warray-bounds-22.c [new file with mode: 0644]
gcc/tree-vrp.c