X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure-cload.lisp;h=5982b02af87bcb2c7ae8b7a91c312f2e9fe8a1b0;hb=c58795f37078f5900aff5dc4a3712fbadd2d432e;hp=d9905d033c9f78bbabfe705354bb766c88f0043f;hpb=85029815128ff53d16013d51ad0beb79b0eb3744;p=sbcl.git diff --git a/tests/compiler.impure-cload.lisp b/tests/compiler.impure-cload.lisp index d9905d0..5982b02 100644 --- a/tests/compiler.impure-cload.lisp +++ b/tests/compiler.impure-cload.lisp @@ -1,3 +1,6 @@ +(load "assertoid.lisp") +(use-package "ASSERTOID") + ;;; bug 254: compiler falure (defpackage :bug254 (:use :cl)) (in-package :bug254) @@ -117,5 +120,38 @@ '((1 2 3) (7 14 21) (21 14 7)))) (delete-package :bug148) + +;;; bug 258 +(defpackage :bug258 (:use :cl)) +(in-package :bug258) + +(defun u-b-sra (ad0) + (declare (special *foo* *bar*)) + (declare (optimize (safety 3) (speed 2) (space 1) (debug 1))) + (labels ((c.frob (x) + (1- x)) + (ad.frob (ad) + (mapcar #'c.frob ad))) + (declare (inline c.frob ad.frob)) + (list (the list ad0) + (funcall (if (listp ad0) #'ad.frob #'print) ad0) + (funcall (if (listp ad0) #'ad.frob #'print) (reverse ad0))))) + +(assert (equal (u-b-sra '(4 9 7)) + '((4 9 7) (3 8 6) (6 8 3)))) + +(delete-package :bug258) + +;;; +(defun bug233a (x) + (declare (optimize (speed 2) (safety 3))) + (let ((y 0d0)) + (values + (the double-float x) + (setq y (+ x 1d0)) + (setq x 3d0) + (funcall (eval ''list) y (+ y 2d0) (* y 3d0))))) +(assert (raises-error? (bug233a 4) type-error)) + (sb-ext:quit :unix-status 104)