X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Farray.pure.lisp;h=513a6d8b5cf964abe7357eb65481696b0ac47b6c;hb=6c4d4d984b1af6b2a73568cec3ab9c8795cff2da;hp=65a8a6048e0f3d7558f1203d7e1cc13d84947dff;hpb=bcbcc0d0660b3b3741203b3dfdd3443b201bf690;p=sbcl.git diff --git a/tests/array.pure.lisp b/tests/array.pure.lisp index 65a8a60..513a6d8 100644 --- a/tests/array.pure.lisp +++ b/tests/array.pure.lisp @@ -62,12 +62,20 @@ (aref x 12)))))) (error "error not thrown in COMPILED-DECLARED-AREF ~S" form)))))) -;;; On the SPARC, until sbcl-0.7.7.20, there was a bug in array references -;;; for small vector elements (spotted by Raymond Toy). -(assert (= (funcall - (lambda (rmdr) - (declare (type (simple-array bit (*)) rmdr) - (optimize (speed 3) (safety 0))) - (aref rmdr 0)) - #*00000000000000000000000000000001000000000) - 0)) +;;; On the SPARC, until sbcl-0.7.7.20, there was a bug in array +;;; references for small vector elements (spotted by Raymond Toy); the +;;; bug persisted on the PPC until sbcl-0.7.8.20. +(let (vector) + (loop for i below 64 + for list = (make-list 64 :initial-element 1) + do (setf (nth i list) 0) + do (setf vector (make-array 64 :element-type 'bit + :initial-contents list)) + do (assert (= (funcall + (compile nil + `(lambda (rmdr) + (declare (type (simple-array bit (*)) rmdr) + (optimize (speed 3) (safety 0))) + (aref rmdr ,i))) + vector) + 0))))