0.6.8.6: applied MNA megapatch (will be edited shortly)
[sbcl.git] / tests / compiler.pure.lisp
index 9a01572..38aebc8 100644 (file)
@@ -1,6 +1,6 @@
 (cl:in-package :cl-user)
 
-;;; Exercise a compiler bug by (crashing the compiler).
+;;; Exercise a compiler bug (by crashing the compiler).
 ;;;
 ;;; This test code is from Douglas Crosher's simplified TICKLE-BUG
 ;;; (2000-09-06 on cmucl-imp).
 
                       (fun1)
                       nil))))
+
+;;; Exercise a compiler bug (by crashing the compiler).
+;;;
+;;; Tim Moore gave a patch for this bug in CMU CL 2000-05-24 on 
+;;; cmucl-imp, and Martin Atzmueller applied it to SBCL.
+(funcall (compile nil
+                 '(lambda (x)
+                    (or (integerp x)
+                        (block used-by-some-y?
+                          (flet ((frob (stk)
+                                   (dolist (y stk)
+                                     (unless (rejected? y)
+                                       (return-from used-by-some-y? t)))))
+                            (declare (inline frob))
+                            (frob (rstk x))
+                            (frob (mrstk x)))
+                          nil))))
+        13)