From: Alexey D. <ade...@us...> - 2003-09-12 09:17:29
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1:/tmp/cvs-serv747/tests Modified Files: arith.pure.lisp Log Message: 0.8.3.54: * Fix type derivers for %DPB and %DEPOSIT-FIELD: SIGNED-BYTE representation requires extra sign bit. (reported by Paul Dietz) Index: arith.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/arith.pure.lisp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- arith.pure.lisp 11 Sep 2003 15:49:45 -0000 1.14 +++ arith.pure.lisp 12 Sep 2003 09:16:54 -0000 1.15 @@ -137,3 +137,11 @@ (65 (ash most-negative-fixnum 36) t))) (destructuring-bind (index int result) x (assert (eq (eval `(logbitp ,index ,int)) result)))) + +;;; off-by-1 type inference error for %DPB and %DEPOSIT-FIELD: +(let ((f (compile nil '(lambda (b) + (integer-length (dpb b (byte 4 28) -1005)))))) + (assert (= (funcall f 1230070) 32))) +(let ((f (compile nil '(lambda (b) + (integer-length (deposit-field b (byte 4 28) -1005)))))) + (assert (= (funcall f 1230070) 32))) |