X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=a1e239b9c71891f9bb99c4fd42c5134d39b7c6e7;hb=ffe8d65266ed7c2c67a0a6ce7ff0de633000037e;hp=1025f37c41b72288f9839300dd9fd272d362eb7e;hpb=1a3569649605706f9ca6fde135ffb1c77b2246f4;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 1025f37..a1e239b 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -53,11 +53,47 @@ (when (and (digs) (digs)) x)))) ;;; Bug 132: The compiler used to fail to compile INTEGER-valued CATCH -;;; tags. This was fixed by Alexey Dejneka in sbcl-0.7.1.14. (They're -;;; still a bad idea because tags are compared with EQ, but now it's a +;;; tags. This was fixed by Alexey Dejneka in sbcl-0.7.1.14. (INTEGER +;;; catch tags are still a bad idea because EQ is used to compare +;;; tags, and EQ comparison on INTEGERs is unportable; but now it's a ;;; compiler warning instead of a failure to compile.) (defun foo () (catch 0 (print 1331))) + +;;; Bug 150: In sbcl-0.7.1.15, compiling this code caused a failure in +;;; SB-C::ADD-TEST-CONSTRAINTS: +;;; The value NIL is not of type SB-C::CONTINUATION. +;;; This bug was fixed by APD in sbcl-0.7.1.30. +(defun bug150-test1 () + (let* () + (flet ((wufn () (glorp table1 4.9))) + (gleep *uustk* #'wufn "#1" (list))) + (if (eql (lo foomax 3.2)) + (values) + (error "not ~S" '(eql (lo foomax 3.2)))) + (values))) +;;; A simpler test case for bug 150: The compiler died with the +;;; same type error when trying to compile this. +(defun bug150-test2 () + (let () + (<))) + +;;; bug 147, fixed by APD 2002-04-28 +;;; +;;; This test case used to crash the compiler, e.g. with +;;; failed AVER: "(= (LENGTH (BLOCK-SUCC CALL-BLOCK)) 1)" +(defun bug147 (string ind) + (flet ((digs () + (let (old-index) + (if (and (< ind ind) + (typep (char string ind) '(member #\1))) + nil)))))) + +;;; bug reported and fixed by Matthias Hoelzl sbcl-devel 2002-05-13 +(defmacro foo-2002-05-13 () ''x) +(eval '(foo-2002-05-13)) +(compile 'foo-2002-05-13) +(foo-2002-05-13) ; (The bug caused UNDEFINED-FUNCTION to be signalled here.) ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself