X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fthreads.impure.lisp;h=788862bd83870c1f533166c8fea4e4f84195baf0;hb=b14a61c6af3e3005c94e633e727177346240066e;hp=5da2c1b69f85d09039b4ec637f3dc9ce80d93714;hpb=9303b3dc86bdfe5193b403de7419dc5bc8cc79e4;p=sbcl.git diff --git a/tests/threads.impure.lisp b/tests/threads.impure.lisp index 5da2c1b..788862b 100644 --- a/tests/threads.impure.lisp +++ b/tests/threads.impure.lisp @@ -1565,3 +1565,22 @@ (sb-thread:make-thread (lambda () (alien-funcall (extern-alien "alloca_test" (function void))))))) + +(with-test (:name :fp-mode-inheritance-threads) + (flet ((test () + (let ((thread-fp-mode) + (fp-mode (dpb 0 sb-vm::float-sticky-bits (sb-vm:floating-point-modes)))) + (sb-thread:join-thread + (sb-thread:make-thread + (lambda () + (setf thread-fp-mode + (dpb 0 sb-vm::float-sticky-bits (sb-vm:floating-point-modes)))))) + (assert (= fp-mode thread-fp-mode))))) + (test) + (sb-int:with-float-traps-masked (:divide-by-zero) + (test)) + (setf (sb-vm:floating-point-modes) + (dpb sb-vm:float-divide-by-zero-trap-bit + sb-vm::float-traps-byte + (sb-vm:floating-point-modes))) + (test)))