Update of /cvsroot/sbcl/sbcl/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv28091/tests
Modified Files:
compiler-1.impure-cload.lisp
Log Message:
0.7.10.4:
Second try on the bug 115: convert :DEBUG-ENVIRONMENT to
:ENVIRONMENT TN in its native environment. This is not
efficient, but should not cause any new bugs.
Index: compiler-1.impure-cload.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/compiler-1.impure-cload.lisp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- compiler-1.impure-cload.lisp 21 Nov 2002 14:36:07 -0000 1.13
+++ compiler-1.impure-cload.lisp 28 Nov 2002 06:00:56 -0000 1.14
@@ -138,5 +138,39 @@
#'objs.stale?))
(call-next-method))
+;;; bugs 115, 226: compiler failure in lifetime analysis
+(defun bug115-1 ()
+ (declare (optimize (speed 2) (debug 3)))
+ (flet ((m1 ()
+ (unwind-protect nil)))
+ (if (catch nil)
+ (m1)
+ (m1))))
+
+(defun bug115-2 ()
+ (declare (optimize (speed 2) (debug 3)))
+ (flet ((m1 ()
+ (bar (if (foo) 1 2))
+ (let ((x (foo)))
+ (bar x (list x)))))
+ (if (catch nil)
+ (m1)
+ (m1))))
+
+(defun bug226 ()
+ (declare (optimize (speed 0) (safety 3) (debug 3)))
+ (flet ((safe-format (stream string &rest r)
+ (unless (ignore-errors (progn
+ (apply #'format stream string r)
+ t))
+ (format stream "~&foo ~S" string))))
+ (cond
+ ((eq my-result :ERROR)
+ (cond
+ ((ignore-errors (typep condition result))
+ (safe-format t "~&bar ~S" result))
+ (t
+ (safe-format t "~&baz ~S (~A) ~S" condition condition result)))))))
+
(sb-ext:quit :unix-status 104) ; success
|