X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler-2.impure-cload.lisp;h=815a69506b7bd4530dc81d100266b561bbf63f83;hb=a2d206014a62e159ffda2529ac379c2e28bc281c;hp=8c7a3a10d60a6eef304edf6db6dc6aa46e095a25;hpb=a4882e3023fdd5e777169a4cbede33605281173c;p=sbcl.git diff --git a/tests/compiler-2.impure-cload.lisp b/tests/compiler-2.impure-cload.lisp index 8c7a3a1..815a695 100644 --- a/tests/compiler-2.impure-cload.lisp +++ b/tests/compiler-2.impure-cload.lisp @@ -18,8 +18,8 @@ ;;;; These three forms should be equivalent. -;;;; This used to be a bug in the handling of null-lexenv vs toplevel -;;;; policy: LOCALLY and MACROLET hid the toplevel policy from view. +;;; This used to be a bug in the handling of null-lexenv vs toplevel +;;; policy: LOCALLY and MACROLET hid the toplevel policy from view. (locally (defun foo (n) @@ -51,5 +51,16 @@ (assert (equal (test) '(0 0 0))) (assert (equal (test) '(13 13 13))) ; sanity check -(write-line "//compiler-2.impure.cload.lisp") +;;; Bug in 1.0.2 and 1.0.3, where the XEP was compiled with the wrong +;;; policy. (Test-case derived from code posted by alexander.ekart in +;;; comp.lang.lisp). +(locally + (declare (optimize (safety 0))) + (defun bubblesort (x y) + (declare (type (simple-array fixnum (*)) x) + (type fixnum y) + (optimize (speed 3) (safety 3) (space 0) (debug 0))) + (aref x y))) + +(assert (raises-error? (bubblesort (make-array 10) 9)))