X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure-cload.lisp;h=956c43ca374701bb0752cc83112b6e4155620b25;hb=7abb9e44907ef12b52ac26d6482fbe21c036ee9b;hp=2967dfc6f927657e7849c9e743192a48efae898f;hpb=140791a0479787eaca83bea2355c15b65259a823;p=sbcl.git diff --git a/tests/compiler.impure-cload.lisp b/tests/compiler.impure-cload.lisp index 2967dfc..956c43c 100644 --- a/tests/compiler.impure-cload.lisp +++ b/tests/compiler.impure-cload.lisp @@ -340,5 +340,45 @@ (DECLARE (IGNORE OTHER-1)))) (continuation-1))) +;;; reported by antifuchs/bdowning/etc on #lisp: ITERATE failure on +;;; (iter (for i in '(1 2 3)) (+ i 50)) +(defun values-producer () (values 1 2 3 4 5 6 7)) + +(defun values-consumer (fn) + (let (a b c d e f g h) + (multiple-value-bind (aa bb cc dd ee ff gg hh) (funcall fn) + (setq a aa) + (setq b bb) + (setq c cc) + (setq d dd) + (setq e ee) + (setq f ff) + (setq g gg) + (setq h hh) + (values a b c d e f g h)))) + +(let ((list (multiple-value-list (values-consumer #'values-producer)))) + (assert (= (length list) 8)) + (assert (null (nth 7 list)))) + +;;; failed on Alpha prior to sbcl-0.8.10.30 +(defun lotso-values () + (values 0 1 2 3 4 5 6 7 8 9 + 0 1 2 3 4 5 6 7 8 9 + 0 1 2 3 4 5 6 7 8 9 + 0 1 2 3 4 5 6 7 8 9 + 0 1 2 3 4 5 6 7 8 9 + 0 1 2 3 4 5 6 7 8 9 + 0 1 2 3 4 5 6 7 8 9 + 0 1 2 3 4 5 6 7 8 9 + 0 1 2 3 4 5 6 7 8 9 + 0 1 2 3 4 5 6 7 8 9)) + +;;; bug 313: source transforms were "lisp-1" +(defun srctran-lisp1-1 (cadr) (if (functionp cadr) (funcall cadr 1) nil)) +(assert (eql (funcall (eval #'srctran-lisp1-1) #'identity) 1)) +(defvar caar) +(defun srctran-lisp1-2 (caar) (funcall (sb-ext:truly-the function caar) 1)) +(assert (eql (funcall (eval #'srctran-lisp1-2) #'identity) 1)) (sb-ext:quit :unix-status 104)