Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

2 changed files:

Changes:

  • src/compiler/float-tran.lisp
    --- a/src/compiler/float-tran.lisp
    +++ b/src/compiler/float-tran.lisp
    @@ -76,7 +76,7 @@
     		  '(%double-double-float n))
     		 ((csubtypep tspec (specifier-type 'double-float))	
     		  '(%double-float n))	
    -		 ((csubtypep tspec (specifier-type 'float))
    +		 ((csubtypep tspec (specifier-type 'single-float))
     		  '(%single-float n))
     		 #+double-double
     		 ((csubtypep tspec (specifier-type '(complex double-double-float)))
    

  • tests/issues.lisp
    --- a/tests/issues.lisp
    +++ b/tests/issues.lisp
    @@ -200,3 +200,13 @@
     	      tests))
     	   `(progn ,@(nreverse tests)))))
         (make-tests)))
    +
    +(define-test issue.22
    +    (:tag :issues)
    +  (let ((tester (compile nil '(lambda (x)
    +			       (coerce x 'float)))))
    +    (assert-eql 1.0 (funcall tester 1))
    +    (assert-eql 2f0 (funcall tester 2f0))
    +    (assert-eql 3d0 (funcall tester 3d0))
    +    (assert-eql 4w0 (funcall tester 4w0))))
    +