diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2003-10-01 20:48:57 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2003-10-01 16:48:57 -0400 |
commit | 1358cdc5fe7e86cce784dfc28d89e6c8ae2ac5c0 (patch) | |
tree | 955b12405b951572056c19da82991ba1022c68b3 /gcc/fold-const.c | |
parent | 222a5b1d6701dd5de06526b4bc4523a807b160c7 (diff) | |
download | gcc-1358cdc5fe7e86cce784dfc28d89e6c8ae2ac5c0.zip gcc-1358cdc5fe7e86cce784dfc28d89e6c8ae2ac5c0.tar.gz gcc-1358cdc5fe7e86cce784dfc28d89e6c8ae2ac5c0.tar.bz2 |
fold-const.c (make_range): When handling unsigned, don't reverse range if high bound is zero.
* fold-const.c (make_range): When handling unsigned, don't reverse
range if high bound is zero.
From-SVN: r71991
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index f5a6f78..250d659 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3076,10 +3076,10 @@ make_range (tree exp, int *pin_p, tree *plow, tree *phigh) in_p = n_in_p, low = n_low, high = n_high; - /* If the high bound is missing, but we - have a low bound, reverse the range so - it goes from zero to the low bound minus 1. */ - if (high == 0 && low) + /* If the high bound is missing, but we have a non-zero low + bound, reverse the range so it goes from zero to the low bound + minus 1. */ + if (high == 0 && low && ! integer_zerop (low)) { in_p = ! in_p; high = range_binop (MINUS_EXPR, NULL_TREE, low, 0, |