X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=c61786e99a3dc1128e9c6984ce8ebe6020b3e849;hb=a7699535aaba71765335f3be0a2103b2f07941af;hp=2898bcd97c4b24660ab0374e17a507067be84041;hpb=f7ed7e78e455b9a17b902aa030ce897afbe70d71;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 2898bcd..c61786e 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -4723,7 +4723,7 @@ ;; win32 is very specific about the order in which catch blocks ;; must be allocated on the stack -(with-test (:name :bug-121581169) +(with-test (:name :bug-1072739) (let ((f (compile nil `(lambda () (STRING= @@ -4822,3 +4822,41 @@ y)))) (list (string 'list)) (list "lisT"))))) + +(with-test (:name (restart-case optimize speed compiler-note)) + (handler-bind ((compiler-note #'error)) + (compile nil '(lambda () + (declare (optimize speed)) + (restart-case () (c ())))) + (compile nil '(lambda () + (declare (optimize speed)) + (let (x) + (restart-case (setf x (car (compute-restarts))) + (c ())) + x))))) + +(with-test (:name :copy-more-arg + :fails-on '(not (or :x86 :x86-64))) + ;; copy-more-arg might not copy in the right direction + ;; when there are more fixed args than stack frame slots, + ;; and thus end up splatting a single argument everywhere. + ;; Fixed on x86oids only, but other platforms still start + ;; their stack frames at 8 slots, so this is less likely + ;; to happen. + (let ((limit 33)) + (labels ((iota (n) + (loop for i below n collect i)) + (test-function (function skip) + ;; function should just be (subseq x skip) + (loop for i from skip below (+ skip limit) do + (let* ((values (iota i)) + (f (apply function values)) + (subseq (subseq values skip))) + (assert (equal f subseq))))) + (make-function (n) + (let ((gensyms (loop for i below n collect (gensym)))) + (compile nil `(lambda (,@gensyms &rest rest) + (declare (ignore ,@gensyms)) + rest))))) + (dotimes (i limit) + (test-function (make-function i) i)))))