Incorrect runtime error in compiled code

Bug #1951967 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 bug071 (a)
  (declare (optimize (debug 3)))
  (block b8
    (multiple-value-bind (v1)
        (if (common-lisp:handler-case
                (let ((v3 (if a 10 3)))
                  (block b8
                    (truncate
                     (ignore-errors
                      (return-from b8
                        (block b3 (ceiling v3))
                        ))))))
            0 0)
      0)))

(bug071 nil) ==>

Value of SB-C::VAL in
(TRUNCATE (IGNORE-ERRORS (RETURN-FROM B8 (BLOCK B3 (CEILING V3)))) 1)

is
  NIL,
not a
  REAL.
   [Condition of type SIMPLE-TYPE-ERROR]
[...]
  0: (SB-C::%COMPILE-TIME-TYPE-ERROR (NIL) REAL #<unused argument> (SB-C::VAL) "(TRUNCATE (IGNORE-ERRORS (RETURN-FROM B8 (BLOCK B3 (CEILING V3)))) 1)" NIL)
  1: (BUG071 #<unused argument>)
 [...]

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