From: J"orn Rennecke Date: Fri, 14 Nov 1997 00:38:08 +0000 (+0000) Subject: * fold-const.c (fold_truthop): Fix bug in last change. X-Git-Tag: releases/libf2c-0.5.21~581 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f29ca789b773476c2a756542d0a0771edb2c047;p=thirdparty%2Fgcc.git * fold-const.c (fold_truthop): Fix bug in last change. From-SVN: r16473 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 12cac79d33c2..c7070529a9d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Thu Nov 13 23:33:50 1997 J"orn Rennecke + + * fold-const.c (fold_truthop): Fix bug in last change. + 1997-11-13 Paul Eggert Fix some confusion with IEEE minus zero. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 4b4c5e184b4c..0f5a19f9e992 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3425,7 +3425,7 @@ fold_truthop (code, truth_type, lhs, rhs) { if (l_const && integer_zerop (l_const) && integer_pow2p (ll_mask)) { - if (ll_unsignedp) + if (ll_unsignedp || tree_log2 (ll_mask) + 1 < ll_bitsize) l_const = ll_mask; else /* Since ll_arg is a single bit bit mask, we can sign extend @@ -3443,7 +3443,7 @@ fold_truthop (code, truth_type, lhs, rhs) { if (r_const && integer_zerop (r_const) && integer_pow2p (rl_mask)) { - if (rl_unsignedp) + if (rl_unsignedp || tree_log2 (rl_mask) + 1 < rl_bitsize) r_const = rl_mask; else /* This is analogous to the code for l_const above. */