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

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

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 https://gist.github.com/phoe/335fecfdc195bddd47ab0928b0e62e52

This issue is possibly related to https://bugs.launchpad.net/sbcl/+bug/365497

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:
https://gitlab.common-lisp.net/ansi-test/ansi-test/merge_requests/23

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