aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2008-12-12 04:56:29 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2008-12-12 04:56:29 +0000
commit26e4f1baa2647df48d9aaf58c21e159cb7f2a66b (patch)
tree1ffb7ffff10a699fb7a8e87e1fd7bf924380fd57 /gcc/tree-vrp.c
parentdb231d5d4d05d7ec1a203ea65b81331bdda99493 (diff)
downloadgcc-26e4f1baa2647df48d9aaf58c21e159cb7f2a66b.zip
gcc-26e4f1baa2647df48d9aaf58c21e159cb7f2a66b.tar.gz
gcc-26e4f1baa2647df48d9aaf58c21e159cb7f2a66b.tar.bz2
tree-vrp.c (extract_range_from_binary_expr): Don't shift by floor_log2 of zero.
* tree-vrp.c (extract_range_from_binary_expr): Don't shift by floor_log2 of zero. Negate widened zero. From-SVN: r142702
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index a69b216..9d23b24 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -2557,11 +2557,11 @@ extract_range_from_binary_expr (value_range_t *vr,
ior_max.high = vr0_max.high | vr1_max.high;
if (ior_max.high != 0)
{
- ior_max.low = ~0u;
+ ior_max.low = ~(unsigned HOST_WIDE_INT)0u;
ior_max.high |= ((HOST_WIDE_INT) 1
<< floor_log2 (ior_max.high)) - 1;
}
- else
+ else if (ior_max.low != 0)
ior_max.low |= ((unsigned HOST_WIDE_INT) 1u
<< floor_log2 (ior_max.low)) - 1;