Update of /cvsroot/sbcl/sbcl/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10217/tests
Modified Files:
compiler.pure.lisp
Log Message:
0.8.20.2:
Fix the compiler note emission from COUNT and EQUAL on bit-vectors.
(reported by Lutz Euler sbcl-devel 2005-02-16)
... rewrite (1- (ash 1 <integer 1 n-word-bits>)) as
(ash #xff...ff (- n-word-bits <integer 1 n-word-bits>))
Index: compiler.pure.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/compiler.pure.lisp,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- compiler.pure.lisp 23 Feb 2005 08:31:20 -0000 1.117
+++ compiler.pure.lisp 1 Mar 2005 10:54:38 -0000 1.118
@@ -1728,3 +1728,14 @@
(type number p2))
(eql (the (complex double-float) p1) p2)))
c0 #c(12 612/979)))))
+
+;;; reported by Lutz Euler: we shouldn't signal a compiler note for
+;;; simple-bit-vector functions.
+(handler-bind ((sb-ext:compiler-note #'error))
+ (compile nil '(lambda (x)
+ (declare (type simple-bit-vector x))
+ (count 1 x))))
+(handler-bind ((sb-ext:compiler-note #'error))
+ (compile nil '(lambda (x y)
+ (declare (type simple-bit-vector x y))
+ (equal x y))))
|