error: don't know how to dump #S(SB-LOOP::LOOP-MINIMAX ...) when compiling LOOP with errors in FOR clause
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
Bug Description
compile-file of
(defun foo () (Loop for i in (vector) maximize i))
gives the error:
; file: /tmp/foo.lisp
; in: DEFUN FOO
; (LOOP FOR I IN (VECTOR)
; MAXIMIZE I)
; --> BLOCK LET SB-C::%
; ==>
; '((LET ((I NIL) (#:LOOP-LIST-0 (VECTOR)))
; (DECLARE (TYPE LIST #:LOOP-LIST-0))
; (SB-LOOP:
; :ANSWER-VARIABLE #:LOOP-MAXMIN-1
; :TYPE REAL
; :TEMP-VARIABLE #:LOOP-
; :FLAG-VARIABLE #:LOOP-
; :OPERATIONS (MAX)
; :INFINITY-DATA NIL)
; (SB-LOOP::LOOP-BODY NIL (# # NIL #) (#) (# # NIL #) (#))))
; TRULY-THE (SIMPLE-ARRAY T (0))
; (SB-C::
; (TRULY-THE (SIMPLE-ARRAY T (0))
; (SB-KERNEL:
;
; caught ERROR:
; don't know how to dump #S(SB-LOOP:
; :ANSWER-VARIABLE #:LOOP-MAXMIN-1
; :TYPE REAL
; :TEMP-VARIABLE #:LOOP-
; :FLAG-VARIABLE #:LOOP-
; :OPERATIONS (MAX)
; :INFINITY-DATA NIL) (default MAKE-LOAD-FORM method called).
; --> BLOCK LET
; ==>
; (SB-C::
; '(VALUES (SIMPLE-VECTOR 0) &OPTIONAL)
; '((LET ((I NIL) (#:LOOP-LIST-0 #))
; (DECLARE (TYPE LIST #:LOOP-LIST-0))
; (SB-LOOP:
; :ANSWER-VARIABLE #:LOOP-MAXMIN-1
; :TYPE REAL
; :TEMP-VARIABLE #:LOOP-
; :FLAG-VARIABLE #:LOOP-
; :OPERATIONS #
; :INFINITY-DATA NIL)
; (SB-LOOP::LOOP-BODY NIL # # # #)))
; TRULY-THE (SIMPLE-ARRAY T (0))
; (SB-C::
; (TRULY-THE (SIMPLE-ARRAY T #)
; (SB-KERNEL:
; #
; 0)))))
;
; note: The fourth argument never returns a value.
; --> BLOCK LET SB-LOOP:
; --> SB-LOOP:
; ==>
; I
;
; note: deleting unreachable code
Evaluating the DEFUN in repl correctly warns about the type mismatch (VECTOR vs expected LIST).
fails in "1.0.48.35" and "1.1.4.
warns as expected in "1.0.29" linux x8664
Changed in sbcl: | |
importance: | Undecided → Low |
status: | New → Triaged |
Fixed sometime in the past.