Compile time error on invalid code: DERIVE-AREF-TYPE

Bug #2038659 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Committed
Undecided
Unassigned

Bug Description

(lambda ()
  (loop for lv3 below 3
        sum (sbit
             (signum
              lv3))))

==>

The value
  #<SB-KERNEL:NUMERIC-TYPE (INTEGER -1 -1)>
is not of type
  SB-KERNEL:ARRAY-TYPE
   [Condition of type TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD tid=2203 "new-repl-thread" RUNNING {1001110003}>)

Backtrace:
  0: (SB-C::DERIVE-AREF-TYPE #<SB-C::LVAR 1 {10373A5643}>)
  1: ((FLET SB-C::PROCESS-INFO :IN SB-C::IR1-OPTIMIZE-COMBINATION))
  2: (SB-C::IR1-OPTIMIZE-COMBINATION #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME AREF :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECLARED :KIND :GLOBAL..
  3: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME "<unknown>" :REANALYZE T {10373A78F3}> NIL)
  4: (SB-C::IR1-OPTIMIZE-UNTIL-DONE #<SB-C:COMPONENT :NAME "<unknown>" :REANALYZE T {10373A78F3}>)
  5: (SB-C::IR1-OPTIMIZE-PHASE-1 #<SB-C:COMPONENT :NAME "<unknown>" :REANALYZE T {10373A78F3}>)
  6: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME "<unknown>" :REANALYZE T {10373A78F3}>)
 [...]

x86-64, "2.3.9.56-6b0e43beb"

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
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.