From: Alexey Dejneka Date: Sat, 1 May 2004 13:53:43 +0000 (+0000) Subject: 0.8.10.4: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=de66d0244088badaf0898195d3112b62e11727ea;p=sbcl.git 0.8.10.4: * Fix MISC.293 = simple variant of bug 303: multy-use LVAR should not be written in the middle of a BLOCK. --- diff --git a/src/compiler/ir1-translators.lisp b/src/compiler/ir1-translators.lisp index 4ad7749..0bd6161 100644 --- a/src/compiler/ir1-translators.lisp +++ b/src/compiler/ir1-translators.lisp @@ -941,6 +941,7 @@ Evaluate Values-Form and then the Forms, but return all the values of Values-Form." (let ((dummy (make-ctran))) + (ctran-starts-block dummy) (ir1-convert start dummy result values-form) (ir1-convert-progn-body dummy next nil forms))) diff --git a/src/compiler/ir1opt.lisp b/src/compiler/ir1opt.lisp index bfad3a0..6fe4c36 100644 --- a/src/compiler/ir1opt.lisp +++ b/src/compiler/ir1opt.lisp @@ -337,7 +337,11 @@ (not (eq (block-home-lambda block) (block-home-lambda next))) ;; Stack analysis phase wants ENTRY to start a block. - (entry-p (block-start-node next))) + (entry-p (block-start-node next)) + (let ((last (block-last block))) + (and (valued-node-p last) + (awhen (node-lvar last) + (consp (lvar-uses it)))))) nil) (t (join-blocks block next) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 56811da..2810dee 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -1261,3 +1261,18 @@ (compiler-note () (error "IDENTITY derive-type not applied."))) (assert (null (funcall (compile nil '(lambda (x) (funcall #'cddr x))) nil))) + +;;; MISC.293 = easy variant of bug 303: repeated write to the same +;;; LVAR; here the first write may be cleared before the second is +;;; made. +(assert + (zerop + (funcall + (compile + nil + '(lambda () + (declare (notinline complex)) + (declare (optimize (speed 1) (space 0) (safety 1) + (debug 3) (compilation-speed 3))) + (flet ((%f () (multiple-value-prog1 0 (return-from %f 0)))) + (complex (%f) 0))))))) diff --git a/version.lisp-expr b/version.lisp-expr index 5e1b426..5e6ae43 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".) -"0.8.10.3" +"0.8.10.4"