type error during compile with structure access

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

Bug Description

(defstruct rif-struct (n 0 :type integer))
(declaim (special *s2*))

(defun f356 ()
  (let* ((*s2* (make-rif-struct :n 0)))
    (loop for lv3 below 1
       count (position (rif-struct-n *s2*) '(182303654829089632)))))

==>

The value
  364607309658179264
is not of type
  (SIGNED-BYTE 32)
when binding SB-X86-64-ASM::VALUE
   [Condition of type TYPE-ERROR]

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

Backtrace:
  0: (SB-X86-64-ASM::EMIT-SIGNED-DWORD #<SB-ASSEM:SEGMENT {101AE34A93}> 364607309658179264) [external]
  1: (SB-ASSEM::%ASSEMBLE-SECTIONS #<SB-ASSEM:SEGMENT {101AE34A93}> (0 #()) (29 #(#<SB-ASSEM:LABEL 1> #<SB-ASSEM:LABEL 2> (#1=# SB-X86-64-ASM::MOV #2=#<SB-C:TN t1[RSI] :NORMAL> #<SB-X86-64-ASM::EA base=#3..
  2: (SB-ASSEM:ASSEMBLE-SECTIONS #S(SB-ASSEM::ASMSTREAM :DATA-SECTION (0 #()) :CODE-SECTION (29 #(#<SB-ASSEM:LABEL 1> #<SB-ASSEM:LABEL 2> # # # # ...) #(# # #<SB-ASSEM:LABEL 3> # # #<SB-ASSEM:LABEL 4> ...)..
  3: (SB-C::GENERATE-CODE #<SB-C:COMPONENT :NAME F356 {101ADEBA33}>)
  4: (SB-C::%COMPILE-COMPONENT #<SB-C:COMPONENT :NAME F356 {101ADEBA33}>)
[...]

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Same error:

(defun f356a ()
  (let ((x (make-rif-struct)))
    (position (rif-struct-n x) '(182303654829089632))))

Revision history for this message
Stas Boukarev (stassats) wrote :

3c159f1a250e6a5e0f32fccddc2078eae73e7056

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → 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.