ANSI-TEST: failures at LOOP.1.39 and LOOP.1.40

Bug #1851042 reported by Michał "phoe" Herda on 2019-11-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

SBCL 1.5.6 on Linux.

The following ANSI-TEST test cases fail on SBCL:

;;; The following provides an example where an incorrect
;;; implementation will assign X an out-of-range value
;;; at the end.
(deftest loop.1.39
  (loop for x of-type (integer 1 5) from 1 to 5 collect x)
  (1 2 3 4 5)) ;; SBCL signals a type error

;;; Test that the index variable achieves the inclusive
;;; upper bound, but does not exceed it.
(deftest loop.1.40
  (loop for x from 1 to 5 do (progn) finally (return x))
  5) ;; SBCL returns 6 instead

These two tests are correct because of

This issue is possibly related to

Michał "phoe" Herda (phoe-krk) wrote :

After some discussion, the related ANSI-TESTs were annotated with :ANSI-SPEC-PROBLEM since the spec is not clear on the values of iteration variables:

Please close this ticket as invalid.

Stas Boukarev (stassats) on 2019-11-27
Changed in sbcl:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers