error: don't know how to dump #S(SB-LOOP::LOOP-MINIMAX ...) when compiling LOOP with errors in FOR clause

Bug #1133423 reported by 3b
6
This bug affects 1 person
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::%COMPILE-TIME-TYPE-ERROR
; ==>
; '((LET ((I NIL) (#:LOOP-LIST-0 (VECTOR)))
; (DECLARE (TYPE LIST #:LOOP-LIST-0))
; (SB-LOOP::WITH-MINIMAX-VALUE #S(SB-LOOP::LOOP-MINIMAX
; :ANSWER-VARIABLE #:LOOP-MAXMIN-1
; :TYPE REAL
; :TEMP-VARIABLE #:LOOP-MAXMIN-TEMP-2
; :FLAG-VARIABLE #:LOOP-MAXMIN-FLAG-3
; :OPERATIONS (MAX)
; :INFINITY-DATA NIL)
; (SB-LOOP::LOOP-BODY NIL (# # NIL #) (#) (# # NIL #) (#))))
; TRULY-THE (SIMPLE-ARRAY T (0))
; (SB-C::INITIALIZE-VECTOR
; (TRULY-THE (SIMPLE-ARRAY T (0))
; (SB-KERNEL:ALLOCATE-VECTOR 169 (THE SB-INT:INDEX LENGTH) 0))))
;
; caught ERROR:
; don't know how to dump #S(SB-LOOP::LOOP-MINIMAX
; :ANSWER-VARIABLE #:LOOP-MAXMIN-1
; :TYPE REAL
; :TEMP-VARIABLE #:LOOP-MAXMIN-TEMP-2
; :FLAG-VARIABLE #:LOOP-MAXMIN-FLAG-3
; :OPERATIONS (MAX)
; :INFINITY-DATA NIL) (default MAKE-LOAD-FORM method called).

; --> BLOCK LET
; ==>
; (SB-C::%COMPILE-TIME-TYPE-ERROR 'SB-C::DUMMY 'LIST
; '(VALUES (SIMPLE-VECTOR 0) &OPTIONAL)
; '((LET ((I NIL) (#:LOOP-LIST-0 #))
; (DECLARE (TYPE LIST #:LOOP-LIST-0))
; (SB-LOOP::WITH-MINIMAX-VALUE #S(SB-LOOP::LOOP-MINIMAX
; :ANSWER-VARIABLE #:LOOP-MAXMIN-1
; :TYPE REAL
; :TEMP-VARIABLE #:LOOP-MAXMIN-TEMP-2
; :FLAG-VARIABLE #:LOOP-MAXMIN-FLAG-3
; :OPERATIONS #
; :INFINITY-DATA NIL)
; (SB-LOOP::LOOP-BODY NIL # # # #)))
; TRULY-THE (SIMPLE-ARRAY T (0))
; (SB-C::INITIALIZE-VECTOR
; (TRULY-THE (SIMPLE-ARRAY T #)
; (SB-KERNEL:ALLOCATE-VECTOR 169
; #
; 0)))))
;
; note: The fourth argument never returns a value.

; --> BLOCK LET SB-LOOP::WITH-MINIMAX-VALUE LET SB-LOOP::LOOP-BODY TAGBODY
; --> SB-LOOP::LOOP-ACCUMULATE-MINIMAX-VALUE PROGN SETQ THE
; ==>
; 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.36-506af58-dirty", linux x8664
warns as expected in "1.0.29" linux x8664

Stas Boukarev (stassats)
Changed in sbcl:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Stas Boukarev (stassats) wrote :

Fixed sometime in the past.

Changed in sbcl:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.