From: Nathan Froyd Date: Mon, 22 Feb 2010 21:54:31 +0000 (+0000) Subject: 1.0.35.18: Fix type-derivation for EXPT X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=7f12dce284a158a3f045aff940a14990c05bfbc8;p=sbcl.git 1.0.35.18: Fix type-derivation for EXPT A small thinko in the condition checking for (EXPT ). --- diff --git a/NEWS b/NEWS index 9d4f7a9..68ac632 100644 --- a/NEWS +++ b/NEWS @@ -23,16 +23,18 @@ changes relative to sbcl-1.0.35: * bug fix: Fix grammer and style issues for the docstrings of printer-related variables and functions. (Thanks to mon_key; launchpad bug lp#518696) - * bug fix: fix compilation on chenygc platforms. Thanks to Larry Valkama and + * bug fix: Fix compilation on chenygc platforms. Thanks to Larry Valkama and Bruce O'Neel. * bug fix: SB-THREAD:CONDITION-WAIT sometimes signaled a deadline twice in a row even though a handler defered the deadline long into the future. (lp#512914) - * bug fix: a deadline handler was run without interrupts enabled for a + * bug fix: A deadline handler was run without interrupts enabled for a deadline signaled within SB-THREAD:CONDITION-WAIT. That could result in infinitely spinning, non-killable threads. - * bug fix: backtrace from internal-errors on x86-64 os x was truncated + * bug fix: Backtrace from internal-errors on x86-64 os x was truncated before reaching the erring stack frame. + * bug fix: Fix type derivation for EXPT when raising a fixnum to a + real power. (launchpad bug lp#525949) changes in sbcl-1.0.35 relative to sbcl-1.0.34: * optimization: ROUND with a single single-float or double-float argument diff --git a/src/compiler/float-tran.lisp b/src/compiler/float-tran.lisp index a1184e1..c9879b9 100644 --- a/src/compiler/float-tran.lisp +++ b/src/compiler/float-tran.lisp @@ -1017,7 +1017,7 @@ ;; But a positive real to any power is well-defined. (merged-interval-expt x y)) ((and (csubtypep x (specifier-type 'rational)) - (csubtypep x (specifier-type 'rational))) + (csubtypep y (specifier-type 'rational))) ;; A rational to the power of a rational could be a rational ;; or a possibly-complex single float (specifier-type '(or rational single-float (complex single-float)))) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index bb495bd..a924be7 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3400,6 +3400,22 @@ (with-test (:name :unary-round-type-derivation) (let* ((src '(lambda (zone) (multiple-value-bind (h m) (truncate (abs zone) 1.0) + (declare (ignore h)) (round (* 60.0 m))))) (fun (compile nil src))) (assert (= (funcall fun 0.5) 30)))) + +(with-test (:name :bug-525949) + (let* ((src '(lambda () + (labels ((always-one () 1) + (f (z) + (let ((n (funcall z))) + (declare (fixnum n)) + (the double-float (expt n 1.0d0))))) + (f #'always-one)))) + (warningp nil) + (fun (handler-bind ((warning (lambda (c) + (setf warningp t) (muffle-warning c)))) + (compile nil src)))) + (assert (not warningp)) + (assert (= 1.0d0 (funcall fun))))) diff --git a/version.lisp-expr b/version.lisp-expr index 725a600..c828100 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.35.17" +"1.0.35.18"