X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure-cload.lisp;h=04eb4d7473bb5c5d94f878cad64028b4bbefebe5;hb=7c7e6276719b8d40fddec2070cad81064a25c8ed;hp=c21dad78638749a3d55a9baa8c85678445014c9e;hpb=ce18bcfe50994889a5e3245cacd8702b5a0ced89;p=sbcl.git diff --git a/tests/compiler.pure-cload.lisp b/tests/compiler.pure-cload.lisp index c21dad7..04eb4d7 100644 --- a/tests/compiler.pure-cload.lisp +++ b/tests/compiler.pure-cload.lisp @@ -101,6 +101,11 @@ (optimize (speed 3) (safety 1) (debug 1))) (let ((v3 (min -1720 b))) (max v3 (logcount (if (= v3 b) b b))))) +(defun #:foo (d) + (let ((v7 (flet ((%f16 () (labels ((%f3 () -8)) (%f3)))) + (labels ((%f7 () (%f16))) d)))) + 132887443)) + ;;; RESULT-FORM in DO is not contained in the implicit TAGBODY (assert (eq (handler-case (eval `(do ((x '(1 2 3) (cdr x))) ((endp x) (go :loop)) @@ -120,13 +125,13 @@ ;;; Verify type checking policy in full calls: the callee is supposed ;;; to perform check, but the results should not be used before the ;;; check will be actually performed. -#+nil (locally (declare (optimize (safety 3))) (flet ((bar (f a) (declare (type (simple-array (unsigned-byte 32) (*)) a)) (declare (type (function (fixnum)) f)) (funcall f (aref a 0)))) + #-x86-64 (assert (eval `(let ((n (1+ most-positive-fixnum))) (if (not (typep n '(unsigned-byte 32))) @@ -139,3 +144,21 @@ (make-array 1 :element-type '(unsigned-byte 32) :initial-element n)) nil))))))) + +;;; bug 261 +(let ((x (list (the (values &optional fixnum) (eval '(values)))))) + (assert (equal x '(nil)))) + +;;; Bug 125, reported by Gabe Garza: Python did not preserve identity +;;; of closures. +(flet ((test-case (test-pred x) + (let ((func (lambda () x))) + (list (eq func func) + (funcall test-pred func func) + (delete func (list func)))))) + (assert (equal '(t t nil) (funcall (eval #'test-case) #'eq 3)))) + +;;; compiler failure reported by Alan Shields: +;;; MAYBE-INFER-ITERATION-VAR-TYPE did not deal with types (REAL * (n)). +(let ((s (loop for x from (- pi) below (floor (* 2 pi)) by (/ pi 75) count t))) + (assert (= s 219)))