X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=5ef755f79d4550a0fd3d1d378e326610c0f84879;hb=d5e1f093b8ca643ce4f39554232e0a1688e85b7c;hp=b261b83af7468d377fa612aec3a0e38eb322864d;hpb=94c003b32e49fc11a182d50c405ffa18183aa005;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index b261b83..5ef755f 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3484,3 +3484,21 @@ (assert (not (ctu:find-named-callees fun))) (assert (= 1 (funcall fun #*000001))) (assert (= 0 (funcall fun #*000010))))) + +(with-test (:name :mult-by-one-in-float-acc-zero) + (assert (eql 1.0 (funcall (compile nil `(lambda (x) + (declare (optimize (sb-c::float-accuracy 0))) + (* x 1.0))) + 1))) + (assert (eql -1.0 (funcall (compile nil `(lambda (x) + (declare (optimize (sb-c::float-accuracy 0))) + (* x -1.0))) + 1))) + (assert (eql 1.0d0 (funcall (compile nil `(lambda (x) + (declare (optimize (sb-c::float-accuracy 0))) + (* x 1.0d0))) + 1))) + (assert (eql -1.0d0 (funcall (compile nil `(lambda (x) + (declare (optimize (sb-c::float-accuracy 0))) + (* x -1.0d0))) + 1))))