X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=833c5ee215005a80be0b97858dfd679f2f874c6a;hb=bcd323c39d6f5f80020ba4a5d9eb8d348c6cc499;hp=7d8faf1a7fd55b80785ab8814f4bf64320507fd0;hpb=7374cac4bf6ad3b9f109e4a4d0558325b2cad230;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 7d8faf1..833c5ee 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -4357,3 +4357,24 @@ (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)))) + +(with-test (:name :first-open-coded) + (let ((fun (compile nil `(lambda (x) (first x))))) + (assert (not (ctu:find-named-callees fun))))) + +(with-test (:name :second-open-coded) + (let ((fun (compile nil `(lambda (x) (second x))))) + (assert (not (ctu:find-named-callees fun)))))