This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/59124] [4.9/5/6 Regression] Wrong warnings "array subscript is above array bounds"
- From: "ppalka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 Mar 2016 00:55:32 +0000
- Subject: [Bug tree-optimization/59124] [4.9/5/6 Regression] Wrong warnings "array subscript is above array bounds"
- Auto-submitted: auto-generated
- References: <bug-59124-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124
--- Comment #38 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Author: ppalka
Date: Wed Mar 30 00:55:00 2016
New Revision: 234544
URL: https://gcc.gnu.org/viewcvs?rev=234544&root=gcc&view=rev
Log:
PR tree-optimization/59124 (bogus -Warray-bounds warning)
gcc/ChangeLog:
PR tree-optimization/59124
* tree-vrp.c (register_edge_assert_for_2): For NAME != CST1
where NAME = A +- CST2 add the assertion A != (CST1 -+ CST2).
gcc/testsuite/ChangeLog:
PR tree-optimization/59124
* gcc.dg/Warray-bounds-19.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/Warray-bounds-19.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c