From 56a55fd26733bb228e69f9c884baddd772308724 Mon Sep 17 00:00:00 2001 From: Alexey Dejneka Date: Tue, 23 Sep 2003 06:51:39 +0000 Subject: [PATCH] 0.8.3.88: * Fix bug reported by Paul Dietz 2003-09-22: do not perform modular function coversion in deleted blocks. --- BUGS | 43 ++++++++++++++++++++++++++++++++++++-- src/compiler/srctran.lisp | 3 ++- tests/compiler.impure-cload.lisp | 9 +++++++- version.lisp-expr | 2 +- 4 files changed, 52 insertions(+), 5 deletions(-) diff --git a/BUGS b/BUGS index 788da3e..be258bd 100644 --- a/BUGS +++ b/BUGS @@ -1256,5 +1256,44 @@ WORKAROUND: the control word; however, this clobbers any change the user might have made. -292: - (fixed in 0.8.3.74) +293: + From Paul Dietz: + + (defparameter *f1* + (compile nil '(LAMBDA (C) + (TRUNCATE (LOGORC1 -996082 C) -2)))) + + (defparameter *f2* + (compile nil '(LAMBDA (C) (DECLARE (NOTINLINE TRUNCATE)) + (TRUNCATE (LOGORC1 -996082 C) -2)))) + + (print (funcall *f1* 25337234)) ==> 13099002 + (print (funcall *f2* 25337234)) ==> -13099001 + +294: + From Paul Dietz: + + * (funcall (compile nil `(lambda (c) + (declare (optimize (speed 3)) + (type (integer 23062188 149459656) c)) + (mod c (min -2 0)))) + 95019853) + + debugger invoked on condition of type SB-INT:SIMPLE-PROGRAM-ERROR: + invalid number of arguments: 1 + + [...] + + * (funcall (compile nil `(lambda (b) + (declare (optimize (speed 3)) + (type (integer 2 152044363) b)) + (rem b (min -16 0)))) + 108251912) + + debugger invoked on condition of type SB-INT:SIMPLE-PROGRAM-ERROR: + invalid number of arguments: 1 + +295: + From Paul Dietz: + + (ash -1000000000000 -10000000000000000000) ==> 0 ;; should be -1 diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp index a5ea013..56439e4 100644 --- a/src/compiler/srctran.lisp +++ b/src/compiler/srctran.lisp @@ -2493,7 +2493,8 @@ (setf (block-reoptimize (node-block node)) t) (setf (component-reoptimize (node-component node)) t)) (cut-node (node &aux did-something) - (when (and (combination-p node) + (when (and (not (block-delete-p (node-block node))) + (combination-p node) (fun-info-p (basic-combination-kind node))) (let* ((fun-ref (lvar-use (combination-fun node))) (fun-name (leaf-source-name (ref-leaf fun-ref))) diff --git a/tests/compiler.impure-cload.lisp b/tests/compiler.impure-cload.lisp index 661c184..8e668fb 100644 --- a/tests/compiler.impure-cload.lisp +++ b/tests/compiler.impure-cload.lisp @@ -276,7 +276,7 @@ (device)))) ;;; -(defun foo () +(defun #:foo () (labels ((foo (x) (return-from foo x) (block u @@ -286,5 +286,12 @@ (1+ x))) #'foo)) +(defun #:foo (b c) + (declare (type (integer 0 1) b) (optimize (speed 3))) + (flet ((%f2 () (lognor (block b5 138) c))) + (if (not (or (= -67399 b) b)) + (deposit-field (%f2) (byte 11 8) -3) + c))) + (sb-ext:quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index 1a300b0..26304fa 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.3.87" +"0.8.3.88" -- 1.7.10.4