This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43833] false warning: array subscript is above array bounds with -O3
- From: "jiez at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Apr 2010 11:00:08 -0000
- Subject: [Bug tree-optimization/43833] false warning: array subscript is above array bounds with -O3
- References: <bug-43833-11162@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jiez at gcc dot gnu dot org 2010-04-26 11:00 -------
Subject: Bug 43833
Author: jiez
Date: Mon Apr 26 10:59:48 2010
New Revision: 158728
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158728
Log:
PR tree-optimization/43833
* tree-vrp.c (range_int_cst_p): New.
(range_int_cst_singleton_p): New.
(extract_range_from_binary_expr): Optimize BIT_AND_EXPR case
when both operands are constants. Use range_int_cst_p in
BIT_IOR_EXPR case.
testsuite/
PR tree-optimization/43833
gcc.dg/Warray-bounds-8.c: New test case.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/Warray-bounds-8.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/tree-vrp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43833