X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=bccf8efd74ac2d1e49265295f022c2129aca6ac2;hb=0b3f5cc5fa9e6b121d232960ccd964d2eb15f695;hp=6ffdf0ab40ddbe8578bfd59df02237a03c7a9e65;hpb=aae2706b8a22e913bb354531687797450446ea81;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 6ffdf0a..bccf8ef 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -4568,9 +4568,19 @@ (test (- most-positive-fixnum x) y) (test (+ most-negative-fixnum x) y)))))) -(test-util:with-test (:name :fold-index-addressing-positive-offset) +;; expected failure +(test-util:with-test (:name :fold-index-addressing-positive-offset + :fails-on '(and)) (let ((f (compile nil `(lambda (i) (if (typep i '(integer -31 31)) (aref #. (make-array 63) (+ i 31)) (error "foo")))))) (funcall f -31))) + +;; 5d3a728 broke something like this in CL-PPCRE +(test-util:with-test (:name :fold-index-addressing-potentially-negative-index) + (compile nil `(lambda (index vector) + (declare (optimize speed (safety 0)) + ((simple-array character (*)) vector) + ((unsigned-byte 24) index)) + (aref vector (1+ (mod index (1- (length vector))))))))