From 1d133f104bc703291f7b6f5b826d465eb435e9b2 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sun, 28 Feb 2010 17:37:12 +0000 Subject: [PATCH] 1.0.36.2: buglet in LVAR-MATCHES * LVAR-USE where it should have been LVAR-USES. Fixes launchpad bug #523612. --- NEWS | 2 ++ src/compiler/ir1util.lisp | 5 ++++- tests/compiler.pure.lisp | 10 ++++++++++ version.lisp-expr | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a602fd7b9..eda1078f5 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 257fbe550..6641386ef 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 a924be789..3df48f9e9 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 fee349ba5..e1b552b34 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" -- 2.11.4.GIT