Failed AVER in SB-C::NODE-ENDS-BLOCK

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

Bug Description

(defun f9 (a)
  (block b2
    (evenp
     (let* ((v1 (make-array nil :initial-element
                            (restart-bind nil
                              (return-from b2 a)))))
       (declare (dynamic-extent v1))
       (aref v1)
       ))))

==>

failed AVER:
    (AND (EQ (SB-C::CTRAN-KIND SB-C::START) :INSIDE-BLOCK)
         (NOT (SB-C::BLOCK-DELETE-P BLOCK)))

This appears to have something to do with the DYNAMIC-EXTENT declaration. It also doesn't occur if the zero dimensional array is replaced with a vector of 1 element.

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

Simplified:

(defun f9 (a)
  (block b2
    (let* ((v1 (make-array nil :initial-element
                           (restart-bind nil
                             (return-from b2 a)))))
      (declare (dynamic-extent v1))
      (aref v1)
      )))

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

Similar example:

(defun f ()
  (let* ((v (make-array nil :initial-element (let ((v2 (cons 0 0)))
                                               (return-from f 0)))))
    (declare (dynamic-extent v))
    (aref v)))

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

In 561fda243be8967968640bf67cc553237d83fbb0

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