[pypy-svn] r77320 - pypy/branch/fast-forward/pypy/rlib/rstruct

afa at codespeak.net afa at codespeak.net
Fri Sep 24 00:05:14 CEST 2010


Author: afa
Date: Fri Sep 24 00:05:13 2010
New Revision: 77320

Modified:
   pypy/branch/fast-forward/pypy/rlib/rstruct/ieee.py
Log:
Skip the check, this fixes the test.


Modified: pypy/branch/fast-forward/pypy/rlib/rstruct/ieee.py
==============================================================================
--- pypy/branch/fast-forward/pypy/rlib/rstruct/ieee.py	(original)
+++ pypy/branch/fast-forward/pypy/rlib/rstruct/ieee.py	Fri Sep 24 00:05:13 2010
@@ -43,8 +43,12 @@
     else:
         raise ValueError("invalid size value")
 
-    if Q >> BITS:
-         raise ValueError("input out of range")
+    if not objectmodel.we_are_translated():
+        # This tests generates wrong code when translated:
+        # with gcc, shifting a 64bit int by 64 bits does
+        # not change the value.
+        if Q >> BITS:
+            raise ValueError("input out of range")
 
     # extract pieces
     one = r_ulonglong(1)



More information about the Pypy-commit mailing list