Errors during rewrite of :initial-contents are not caught in transform for MAKE-ARRAY

Bug #1741513 reported by Paul F. Dietz on 2018-01-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

(compile nil '(lambda (x) (make-array '(10) :initial-contents (loop for i of-type 0 below x collect i))))

==>

bad thing to be a type specifier: 0
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (SB-KERNEL::VALUES-SPECIFIER-TYPE-R (0 . T) 0)
  1: (SB-KERNEL::SPECIFIER-TYPE-R (0 . T) 0)
  2: (SB-KERNEL:SPECIFIER-TYPE 0)
  3: (SUBTYPEP 0 NUMBER #<unused argument>)
  4: (SB-LOOP::LOOP-CHECK-DATA-TYPE 0 NUMBER NUMBER)
  5: (SB-LOOP::LOOP-FOR-ARITHMETIC I X 0 :BELOW)
  6: (SB-LOOP::LOOP-HACK-ITERATION (SB-LOOP::LOOP-DO-FOR))
  7: (SB-LOOP::LOOP-ITERATION-DRIVER #S(SB-LOOP::MACRO-STATE :SOURCE-CODE #1=(COLLECT I) :ORIGINAL-SOURCE-CODE NIL :SOURCE-CONTEXT (FOR I OF-TYPE 0 BELOW X . #1#) :NAMES NIL :MACRO-ENVIRONMENT #S(SB-KERNEL..
  8: (SB-LOOP::LOOP-TRANSLATE #S(SB-LOOP::MACRO-STATE :SOURCE-CODE #1=(COLLECT I) :ORIGINAL-SOURCE-CODE NIL :SOURCE-CONTEXT (FOR I OF-TYPE 0 BELOW X . #1#) :NAMES NIL :MACRO-ENVIRONMENT #S(SB-KERNEL:LEXENV..
  9: ((FLET SB-IMPL::PERFORM-EXPANSION :IN MACROEXPAND-1) #<FUNCTION (MACRO-FUNCTION LOOP) {2247197B}> NIL)
 10: (MACROEXPAND (LOOP FOR I OF-TYPE 0 BELOW ...) #S(SB-KERNEL:LEXENV :FUNS NIL :VARS ((X . #)) :BLOCKS NIL :TAGS NIL :TYPE-RESTRICTIONS NIL :LAMBDA #<SB-C::CLAMBDA :%SOURCE-NAME SB-C::.ANONYMOUS. :%DEBUG..
 11: (SB-C::REWRITE-INITIAL-CONTENTS 1 (LOOP FOR I OF-TYPE 0 BELOW ...) #S(SB-KERNEL:LEXENV :FUNS NIL :VARS ((X . #)) :BLOCKS NIL :TAGS NIL :TYPE-RESTRICTIONS NIL :LAMBDA #<SB-C::CLAMBDA :%SOURCE-NAME SB-C..
 12: ((:SOURCE-TRANSFORM MAKE-ARRAY) (MAKE-ARRAY (QUOTE (10)) :INITIAL-CONTENTS (LOOP FOR I OF-TYPE 0 BELOW ...)) #S(SB-KERNEL:LEXENV :FUNS NIL :VARS ((X . #)) :BLOCKS NIL :TAGS NIL :TYPE-RESTRICTIONS NIL ..

Stas Boukarev (stassats) wrote :

1e2a6f25195eb7a552ce0da370592a20d8fc8554

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

Other bug subscribers