From 58c6aaf84ac0649200256756ac719d13f746aad8 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Fri, 3 Oct 2003 15:02:02 +0000 Subject: [PATCH] (compile nil '(lambda (b) (declare (type (integer -290488443 2) b) (optimize (speed 3) (safety 1) (debug 1))) (let ((v3 (min -1720 b))) (max v3 (logcount (if (= v3 b) b b)))))) => error in function lisp::assert-error: the assertion (eq c::env (c::lambda-environment (c::lambda-var-home c::thing))) failed. Found by Paul Dietz. Fix from SBCL/Alexey Dejneka. * src/compiler/constraint.lisp (constrain-ref-type): Don't change a ref to an unused leaf. --- compiler/constraint.lisp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/constraint.lisp b/compiler/constraint.lisp index d445196a2..67a485934 100644 --- a/compiler/constraint.lisp +++ b/compiler/constraint.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/constraint.lisp,v 1.25 2002/10/15 16:36:51 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/constraint.lisp,v 1.26 2003/10/03 15:02:02 gerd Rel $") ;;; ;;; ********************************************************************** ;;; @@ -402,7 +402,8 @@ (setq not-res (type-union not-res other-type))) (let ((leaf-type (leaf-type leaf))) (when (or (constant-p other) - (and (csubtypep other-type leaf-type) + (and (leaf-refs other) + (csubtypep other-type leaf-type) (not (type= other-type leaf-type)))) (change-ref-leaf ref other) (when (constant-p other) (return))))))) -- GitLab