diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-04-13 17:16:37 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-04-13 17:16:37 -0400 |
commit | aa830baff1650a2f56fafd0f0be869217120aa3c (patch) | |
tree | 123da0c1fc4d6c139549761d568815496d84cc21 | |
parent | bece5e07ad2c356a5932024996d1489c686976d8 (diff) | |
download | gcc-aa830baff1650a2f56fafd0f0be869217120aa3c.zip gcc-aa830baff1650a2f56fafd0f0be869217120aa3c.tar.gz gcc-aa830baff1650a2f56fafd0f0be869217120aa3c.tar.bz2 |
(size_int): NUMBER is unsigned so don't test for negative.
(optimize_bit_field_compare, all_ones_mask_p): Add missing last arg to
force_fit_type call.
From-SVN: r4138
-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 a7994ae..d40e9c8 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1437,10 +1437,10 @@ size_int (number) /* Type-size nodes already made for small sizes. */ static tree size_table[2*HOST_BITS_PER_WIDE_INT + 1]; - if (number >= 0 && number < 2*HOST_BITS_PER_WIDE_INT + 1 + if (number < 2*HOST_BITS_PER_WIDE_INT + 1 && size_table[number] != 0) return size_table[number]; - if (number >= 0 && number < 2*HOST_BITS_PER_WIDE_INT + 1) + if (number < 2*HOST_BITS_PER_WIDE_INT + 1) { push_obstacks_nochange (); /* Make this a permanent node. */ @@ -2309,7 +2309,7 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs) /* Make the mask to be used against the extracted field. */ mask = build_int_2 (~0, ~0); TREE_TYPE (mask) = unsigned_type; - force_fit_type (mask); + force_fit_type (mask, 0); mask = convert (unsigned_type, mask); mask = const_binop (LSHIFT_EXPR, mask, size_int (lnbitsize - lbitsize), 0); mask = const_binop (RSHIFT_EXPR, mask, @@ -2471,7 +2471,7 @@ all_ones_mask_p (mask, size) tmask = build_int_2 (~0, ~0); TREE_TYPE (tmask) = signed_type (type); - force_fit_type (tmask); + force_fit_type (tmask, 0); return operand_equal_p (mask, const_binop (RSHIFT_EXPR, |