X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fcompiler.impure.lisp;h=b3970e66dc86aa0552bd42c7601a3b25fcbfc000;hb=6e5c24e786277417fedfea9a6844092de11775df;hp=d437d1cfeac1dbea0636c8c6945f391a5cd5e859;hpb=9045aca85bf17b5a49c01e419a03b84704316fbe;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index d437d1c..b3970e6 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -2246,4 +2246,16 @@ ;; ...but the compiler should not break. (assert (and warn fail)))) +(test-util:with-test (:name :bug-903821) + (let* ((fun (compile nil '(lambda (x n) + (declare (sb-ext:word x) + (type (integer 0 #.(1- sb-vm:n-word-bits)) n) + (optimize speed)) + (logandc2 x (ash -1 n))))) + (trace-output + (with-output-to-string (*trace-output*) + (eval `(trace ,(intern (format nil "ASH-LEFT-MOD~D" sb-vm::n-word-bits) "SB-VM"))) + (assert (= 7 (funcall fun 15 3)))))) + (assert (string= "" trace-output)))) + ;;; success