X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=1712620e1525bebc900411e88f07779ab65ab424;hb=f3491f128307938cc56367f739b8fbf9e5d503b6;hp=73cc33db8160c1bc380fa670e15f2103fab3f043;hpb=b2d132a93d1fb2980b296fb0ae789580eae6691c;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 73cc33d..1712620 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -4028,3 +4028,19 @@ (compile nil `(lambda (x) (declare (type character x)) (eql x #\U0010FFFF)))) + +;; Wide fixnum platforms had buggy address computation in atomic-incf/aref +(with-test (:name :bug-887220) + (let ((incfer (compile + nil + `(lambda (vector index) + (declare (type (simple-array sb-ext:word (4)) + vector) + (type (mod 4) index)) + (sb-ext:atomic-incf (aref vector index) 1) + vector)))) + (assert (equalp (funcall incfer + (make-array 4 :element-type 'sb-ext:word + :initial-element 0) + 1) + #(0 1 0 0)))))