From: Nikodemus Siivola Date: Sun, 28 Feb 2010 17:37:12 +0000 (+0000) Subject: 1.0.36.2: buglet in LVAR-MATCHES X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=1d133f104bc703291f7b6f5b826d465eb435e9b2;p=sbcl.git 1.0.36.2: buglet in LVAR-MATCHES * LVAR-USE where it should have been LVAR-USES. Fixes launchpad bug #523612. --- diff --git a/NEWS b/NEWS index a602fd7..eda1078 100644 --- 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 diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp index 257fbe5..6641386 100644 --- a/src/compiler/ir1util.lisp +++ b/src/compiler/ir1util.lisp @@ -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) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index a924be7..3df48f9 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3419,3 +3419,13 @@ (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))))) diff --git a/version.lisp-expr b/version.lisp-expr index fee349b..e1b552b 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.36.1" +"1.0.36.2"