diff mbox

Fix sanity check in sreal.h

Message ID 20141227151910.GB24103@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Dec. 27, 2014, 3:19 p.m. UTC
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.
diff mbox

Patch

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.  */