X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=f91feb35d8d28e1f289d97ebb2df781d31063c61;hb=61c48c18e47448facd5e41f5b502eee656337cef;hp=4dd6b029fb817af81930ca07837a835bf0e73b1c;hpb=cd08dc8fd4d4b77fdbe87addb06e97cde247bbf9;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 4dd6b02..f91feb3 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -1426,4 +1426,40 @@ (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