From 19fbbd5acb575b36562ca3a95cafc0e3857a54fd Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Sat, 23 Apr 2005 19:31:52 +0000
Subject: [PATCH] Some more dotimes tests, where the bound expr is not a
 constant

---
 ansi-tests/dotimes.lsp | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/ansi-tests/dotimes.lsp b/ansi-tests/dotimes.lsp
index 8501dd2f..389039e2 100644
--- a/ansi-tests/dotimes.lsp
+++ b/ansi-tests/dotimes.lsp
@@ -122,6 +122,15 @@
     y)
   (0 0 0 0))
 
+(deftest dotimes.17a
+  (let ((i 0) (y nil) (bound 4))
+    (declare (special i))
+    (flet ((%f () i))
+      (dotimes (i bound)
+	(push (%f) y)))
+    y)
+  (0 0 0 0))
+
 (deftest dotimes.18
   (let ((i 0) (y nil))
     (declare (special i))
@@ -132,6 +141,16 @@
     y)
   (3 2 1 0))
 
+(deftest dotimes.18a
+  (let ((i 0) (y nil) (bound 4))
+    (declare (special i))
+    (flet ((%f () i))
+      (dotimes (i bound)
+	(declare (special i))
+	(push (%f) y)))
+    y)
+  (3 2 1 0))
+
 (deftest dotimes.19
   (dotimes (i 100 i))
   100)
@@ -166,5 +185,21 @@
 	(declare (special x)))))
   :good)
 
+(deftest dotimes.23a
+  (let ((x :good) (bound 10))
+    (declare (special x))
+    (let ((x :bad))
+      (dotimes (i bound x)
+	(declare (special x)))))
+  :good)
+
+(deftest dotimes.24
+  (let ((bound 4) (j 0))
+    (values
+     (dotimes (i bound)
+       (incf j) (decf bound))
+     bound j))
+  nil 0 4)
+
 (def-macro-test dotimes.error.1
   (dotimes (i 10)))
-- 
GitLab