(with-test (:name :unary-round-type-derivation)
(let* ((src '(lambda (zone)
(multiple-value-bind (h m) (truncate (abs zone) 1.0)
+ (declare (ignore h))
(round (* 60.0 m)))))
(fun (compile nil src)))
(assert (= (funcall fun 0.5) 30))))
+
+(with-test (:name :bug-525949)
+ (let* ((src '(lambda ()
+ (labels ((always-one () 1)
+ (f (z)
+ (let ((n (funcall z)))
+ (declare (fixnum n))
+ (the double-float (expt n 1.0d0)))))
+ (f #'always-one))))
+ (warningp nil)
+ (fun (handler-bind ((warning (lambda (c)
+ (setf warningp t) (muffle-warning c))))
+ (compile nil src))))
+ (assert (not warningp))
+ (assert (= 1.0d0 (funcall fun)))))