Skip to content
Snippets Groups Projects
Commit 5256a270 authored by toy's avatar toy
Browse files

FFLOOR bug from Paul Dietz on cmucl-imp:

(defun f (x) (declare (type (integer 0 100) x)) (ffloor x))

was not compiling.  FTRUNCATE-DERIVE-TYPE-QUOT didn't handle the case
where the result type was FLOAT, which implied that
NUMERIC-TYPE-FORMAT is NIL.
parent 218243f7
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/srctran.lisp,v 1.125 2003/08/16 11:45:46 gerd Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/srctran.lisp,v 1.126 2003/08/17 16:31:10 toy Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -1612,8 +1612,11 @@
(flet ((floatify-bound (x)
;; Don't have to deal with list-type bounds because the
;; truncate defoptimizer doesn't return list-type bounds.
;;
;; Also, if RES-FORMAT is NIL, that means we want a FLOAT
;; type.
(if (numberp x)
(coerce x res-format)
(coerce x (or res-format 'float))
x)))
(make-numeric-type :class 'float
:format res-format
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment