X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=inline;f=tests%2Fcompiler.pure.lisp;h=8e37cf225fd9b3448ea1d12457892c7b8fe12517;hb=43c6634142a96e1d1bab2efe1a39cd8234903c41;hp=b28fe6195885c51dc8a0a92fd4a0e3619bb1cafe;hpb=3cd0a9aafc20ce12075f38ebaed86676c922fde2;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index b28fe61..8e37cf2 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3831,7 +3831,8 @@ (with-test (:name :multiple-args-to-function) (let ((form `(flet ((foo (&optional (x 13)) x)) (funcall (function foo 42)))) - (*evaluator-mode* :interpret)) + #+sb-eval (*evaluator-mode* :interpret)) + #+sb-eval (assert (eq :error (handler-case (eval form) (error () :error)))) @@ -4340,3 +4341,32 @@ (cons (or (car x) (meh))) (t (meh))))))) (funcall (eh x)))) t t))) + +(with-test (:name (:bug-1050768 :symptom)) + ;; Used to signal an error. + (compile nil + `(lambda (string position) + (char string position) + (array-in-bounds-p string (1+ position))))) + +(with-test (:name (:bug-1050768 :cause)) + (let ((types `((string string) + ((or (simple-array character 24) (vector t 24)) + (or (simple-array character 24) (vector t)))))) + (dolist (pair types) + (destructuring-bind (orig conservative) pair + (assert sb-c::(type= (specifier-type cl-user::conservative) + (conservative-type (specifier-type cl-user::orig)))))))) + +(with-test (:name (:smodular64 :wrong-width)) + (let ((fun (compile nil + '(lambda (x) + (declare (type (signed-byte 64) x)) + (sb-c::mask-signed-field 64 (- x 7033717698976965573)))))) + (assert (= (funcall fun 10038) -7033717698976955535)))) + +(with-test (:name (:smodular32 :wrong-width)) + (let ((fun (compile nil '(lambda (x) + (declare (type (signed-byte 31) x)) + (sb-c::mask-signed-field 31 (- x 1055131947)))))) + (assert (= (funcall fun 10038) -1055121909))))