X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=f91feb35d8d28e1f289d97ebb2df781d31063c61;hb=9a19ce460a70a6c1de36095b3e2621116b91cc80;hp=a3d6f330f8cbc3168a59f9e55fa7d4eeeee9f098;hpb=eb459ec23eda2040d01a4200e0e7d4edb7e872a1;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index a3d6f33..f91feb3 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -1403,7 +1403,7 @@ ;;; program-error from bad lambda-list keyword (assert (eq :ok - (handler-case + (handler-case (funcall (lambda (&whole x) (list &whole x))) (program-error () @@ -1416,4 +1416,50 @@ (program-error () :ok)))) +;;; ignore &environment +(handler-bind ((style-warning #'error)) + (compile nil '(lambda () + (defmacro macro-ignore-env (&environment env) + (declare (ignore env)) + :foo))) + (compile nil '(lambda () + (defmacro macro-no-env () + :foo)))) + +(dolist (*evaluator-mode* '(:interpret :compile)) + (disassemble (eval '(defun disassemble-source-form-bug (x y z) + (declare (optimize debug)) + (list x y z))))) + +;;; long-standing bug in defaulting unknown values on the x86-64, +;;; since changing the calling convention (test case by Christopher +;;; Laux sbcl-help 30-06-2007) + +(defun default-values-bug-demo-sub () + (format t "test") + nil) +(compile 'default-values-bug-demo-sub) + +(defun default-values-bug-demo-main () + (multiple-value-bind (a b c d e f g h) + (default-values-bug-demo-sub) + (if a (+ a b c d e f g h) t))) +(compile 'default-values-bug-demo-main) + +(assert (default-values-bug-demo-main)) + +;;; copy propagation bug reported by Paul Khuong + +(defun local-copy-prop-bug-with-move-arg (x) + (labels ((inner () + (values 1 0))) + (if x + (inner) + (multiple-value-bind (a b) + (inner) + (values b a))))) + +(assert (equal '(0 1) (multiple-value-list (local-copy-prop-bug-with-move-arg nil)))) +(assert (equal '(1 0) (multiple-value-list (local-copy-prop-bug-with-move-arg t)))) + ;;; success