1.0.36.2: buglet in LVAR-MATCHES
authorNikodemus Siivola <nikodemus@random-state.net>
Sun, 28 Feb 2010 17:37:12 +0000 (17:37 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sun, 28 Feb 2010 17:37:12 +0000 (17:37 +0000)
 * LVAR-USE where it should have been LVAR-USES.

 Fixes launchpad bug #523612.

NEWS
src/compiler/ir1util.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index a602fd7..eda1078 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@
 changes relative to sbcl-1.0.36:
   * enhancement: Backtrace from THROW to uncaught tag on x86oids now shows
     stack frame thrown from.
+  * bug fix: Fix compiler error involving MAKE-ARRAY and IF forms
+    in :INITIAL-CONTENTS. (lp#523612)
 
 changes in sbcl-1.0.36 relative to sbcl-1.0.35:
   * new feature: SB-EXT:TYPEXPAND-1, SB-EXT:TYPEXPAND, and
index 257fbe5..6641386 100644 (file)
@@ -2190,8 +2190,11 @@ is :ANY, the function name is not checked."
                 (not (null (member (leaf-source-name leaf) names
                                    :test #'equal))))))))
 
+;;; Return true if LVAR's only use is a call to one of the named functions
+;;; (or any function if none are specified) with the specified number of
+;;; of arguments (or any number if number is not specified)
 (defun lvar-matches (lvar &key fun-names arg-count)
-  (let ((use (lvar-use lvar)))
+  (let ((use (lvar-uses lvar)))
     (and (combination-p use)
          (or (not fun-names)
              (multiple-value-bind (name ok)
index a924be7..3df48f9 100644 (file)
                 (compile nil src))))
     (assert (not warningp))
     (assert (= 1.0d0 (funcall fun)))))
+
+(with-test (:name :bug-523612)
+  (let ((fun
+         (compile nil
+                  `(lambda (&key toff)
+                     (make-array 3 :element-type 'double-float
+                                 :initial-contents
+                                 (if toff (list toff 0d0 0d0) (list 0d0 0d0 0d0)))))))
+    (assert (equalp (vector 0.0d0 0.0d0 0.0d0) (funcall fun :toff nil)))
+    (assert (equalp (vector 2.3d0 0.0d0 0.0d0) (funcall fun :toff 2.3d0)))))
index fee349b..e1b552b 100644 (file)
@@ -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.36.1"
+"1.0.36.2"