* real.c (round_for_format): Collect sticky as unsigned long, not bool.
authorRichard Henderson <rth@redhat.com>
Thu, 19 Sep 2002 00:05:28 +0000 (17:05 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 19 Sep 2002 00:05:28 +0000 (17:05 -0700)
From-SVN: r57289

gcc/ChangeLog
gcc/real.c

index 80846d701075247e2c2e8ee7bcb8d8c6dcc28210..7358c1c7c7bbe1bd61200acd055b616cb8e15530 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-18  Richard Henderson  <rth@redhat.com>
+
+       * real.c (round_for_format): Collect sticky as unsigned long, not bool.
+
 2002-09-19  Alan Modra  <amodra@bigpond.net.au>
 
        * config/rs6000/rs6000.md: (floatdisf2): Rename to
index cf72b4c73f2996d502c8ca29b26e2f08c1c17449..57127b643f37a8a5f67953ca24a54e0ac6d5ebff 100644 (file)
@@ -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);