Hi,
sreal::shift does have wrong bounds on exponent shift (that was copied over 
from shift_right).
Bootstrapped/regtested x86_64-linux, comitted as obvious.

Honza

        * sreal.h (sreal::shift): Fix sanity check.

Index: sreal.h
===================================================================
--- sreal.h     (revision 219073)
+++ sreal.h     (working copy)
@@ -87,8 +87,8 @@ public:
     /* Zero needs no shifting.  */
     if (!m_sig)
       return *this;
-    gcc_checking_assert (s <= SREAL_BITS);
-    gcc_checking_assert (s >= -SREAL_BITS);
+    gcc_checking_assert (s <= SREAL_MAX_EXP);
+    gcc_checking_assert (s >= -SREAL_MAX_EXP);
 
     /* Overflows/drop to 0 could be handled gracefully, but hopefully we do not
        need to do so.  */

Reply via email to