re PR tree-optimization/43833 (false warning: array subscript is above array bounds...
authorJie Zhang <jie@codesourcery.com>
Mon, 26 Apr 2010 10:59:34 +0000 (10:59 +0000)
committerJie Zhang <jiez@gcc.gnu.org>
Mon, 26 Apr 2010 10:59:34 +0000 (10:59 +0000)
commit330af32c066a204be770dd623f9fe605262d58ac
treece0e499820982aa0f8a5cf58903650b5becea8b2
parentae2b08888a183d94f9a4f898600b347e5e66b29d
re PR tree-optimization/43833 (false warning: array subscript is above array bounds with -O3)

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.

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