guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 01/01: Fix range inference for right-shifts


From: Andy Wingo
Subject: [Guile-commits] 01/01: Fix range inference for right-shifts
Date: Tue, 26 Nov 2019 05:04:21 -0500 (EST)

wingo pushed a commit to branch master
in repository guile.

commit 08bd2f0dcb42a281596cacc714ad476e872d441d
Author: Andy Wingo <address@hidden>
Date:   Tue Nov 26 11:03:24 2019 +0100

    Fix range inference for right-shifts
    
    * module/language/cps/types.scm (compute-ash-range): Fix rsh range
      inference, broken during refactoring.  Fixes
      https://bugs.gnu.org/38369.
---
 module/language/cps/types.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/language/cps/types.scm b/module/language/cps/types.scm
index f4d05f5..d224f0c 100644
--- a/module/language/cps/types.scm
+++ b/module/language/cps/types.scm
@@ -1358,7 +1358,7 @@ minimum, and maximum."
     ;; shifts that might exceed that range.
     (cond
      ((inf? val) val) ; Preserves sign.
-     ((< count 64) (ash val (max count 0)))
+     ((< count 64) (ash val count))
      ((zero? val) 0)
      ((positive? val) +inf.0)
      (else -inf.0)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]