From a02f19f746ef4808147de0d3d72700eb06b2253c Mon Sep 17 00:00:00 2001 From: Alexey Dejneka Date: Mon, 6 Mar 2006 04:33:26 +0000 Subject: [PATCH] 0.9.10.15: Fix typo in (defconstant m-v-prog1); partially fix the bug in constant-folding reported by Paul F. Dietz in "New compiler bugs", sbcl-devel 2006-03-05. --- BUGS | 4 ++++ src/compiler/constantp.lisp | 2 +- tests/compiler.pure.lisp | 11 ++++++++++- version.lisp-expr | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/BUGS b/BUGS index ed32c27..704bd06 100644 --- a/BUGS +++ b/BUGS @@ -2153,3 +2153,7 @@ WORKAROUND: 399: LOOP FOR ACROSS and full call to DATA-VECTOR-REF (fixed in sbcl-0.9.9.x) + +400: "aggressive constant folding" + (compile '(lambda () (the integer (/ 1 0)))) + signals an error. diff --git a/src/compiler/constantp.lisp b/src/compiler/constantp.lisp index 721e594..97e27a9 100644 --- a/src/compiler/constantp.lisp +++ b/src/compiler/constantp.lisp @@ -195,7 +195,7 @@ constantness of the FORM in ENVIRONMENT." (defconstantp multiple-value-prog1 (first-form &body forms) :test (every #'constantp* (cons first-form forms)) - :test (constant-form-value* first-form)) + :eval (constant-form-value* first-form)) (defconstantp progv (symbols values &body forms) :test (and (constantp* symbols) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 1a4a58c..282cdb0 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -1978,4 +1978,13 @@ (speed 0) (debug 1))) (not (not (logbitp 0 (floor 2147483651 (min -23 0)))))))))) - +;; mistyping found by random-tester +(assert (zerop + (funcall + (compile + nil + '(lambda () + (declare (optimize (speed 1) (debug 0) + (space 2) (safety 0) (compilation-speed 0))) + (unwind-protect 0 + (* (/ (multiple-value-prog1 -29457482 -5602513511) 1)))))))) diff --git a/version.lisp-expr b/version.lisp-expr index 92092f6..7203eff 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.9.10.14" +"0.9.10.15" -- 1.7.10.4