From 15769ca344d8bf0a6faebadaf262e8c98572a0e7 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 18 Sep 2002 17:05:28 -0700 Subject: [PATCH] * real.c (round_for_format): Collect sticky as unsigned long, not bool. From-SVN: r57289 --- gcc/ChangeLog | 4 ++++ gcc/real.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 80846d70107..7358c1c7c7b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-09-18 Richard Henderson + + * real.c (round_for_format): Collect sticky as unsigned long, not bool. + 2002-09-19 Alan Modra * config/rs6000/rs6000.md: (floatdisf2): Rename to diff --git a/gcc/real.c b/gcc/real.c index cf72b4c73f2..57127b643f3 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -2121,7 +2121,8 @@ round_for_format (fmt, r) struct real_value *r; { int p2, np2, i, w; - bool sticky, guard, lsb; + unsigned long sticky; + bool guard, lsb; int emin2m1, emax2; p2 = fmt->p * fmt->log2_b; @@ -2207,8 +2208,7 @@ round_for_format (fmt, r) sticky = 0; for (i = 0, w = (np2 - 1) / HOST_BITS_PER_LONG; i < w; ++i) - if (r->sig[i]) - sticky = 1; + sticky |= r->sig[i]; sticky |= r->sig[w] & (((unsigned long)1 << ((np2 - 1) % HOST_BITS_PER_LONG)) - 1);