(,type
&optional (or ,type ,@other-float-arg-types integer))
* :result result)
- (let ((result-type (lvar-type result)))
+ (let ((result-type (lvar-derived-type result)))
(if (or (not y)
(and (constant-lvar-p y) (= 1 (lvar-value y))))
(if (values-type-p result-type)
(assert (or (= ret (+ (* 5 256) 4)) (= ret (+ (* 4 256) 5))))))
(with-test (:name :coerce-type-warning)
- (dolist (type '(t (unsigned-byte 8) (unsigned-byte 16) (unsigned-byte 32)
+ (dolist (type '(t (unsigned-byte 8) (unsigned-byte 16) (unsigned-byte 32)
(signed-byte 8) (signed-byte 16) (signed-byte 32)))
(multiple-value-bind (fun warningsp failurep)
(compile nil `(lambda (x)
(assert (null warningsp))
(assert (null failurep))
(assert (typep (funcall fun #(1)) `(simple-array ,type (*)))))))
+
+(with-test (:name :truncate-double-float)
+ (let ((fun (compile nil `(lambda (x)
+ (multiple-value-bind (q r)
+ (truncate (coerce x 'double-float))
+ (declare (type unsigned-byte q)
+ (type double-float r))
+ (list q r))))))
+ (assert (equal (funcall fun 1.0d0) '(1 0.0d0)))))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.30.51"
+"1.0.30.52"