From: Bruno Haible <bruno@cl...> - 2004-04-20 19:04:56
;; reported by "Thomas F. Burdick" <tfb@...>
;; According to the HyperSpec 184.108.40.206.4, in for-as-equals-then, var is
;; initialized to the result of evaluating form1. 220.127.116.11 says that
;; initially clauses are evaluated in the loop prologue, which precedes all
;; loop code except for the initial settings provided by with, for, or as.
(loop :for x = 0 :then (1+ x) :for y = (1+ x) :then (ash y 1)
:for z :across #(1 3 9 27 81 243) :for w = (+ x y z)
:initially (assert (zerop x)) :initially (assert (= 2 w))
:until (>= w 100) :collect w)
Expected: (2 6 15 38)
[Taken from clisp's loop.tst] [Bug also present in CMUCL 18e]
Platform: Linux/x86. SBCL version: 0.8.9 compiled by CMUCL 18e.