0 is not of type REAL in function using multiple-value-call, flet, complex

Bug #1804796 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 f337 (a)
  (flet ((%f9 (f9-1 &optional (f9-2 0) (f9-3 (complex a 0)))
           (declare (ignore f9-1 f9-3))
           (/
            (count
             (flet ((%f14 (&optional (f14-1 0) (f14-2 (complex f9-2 0)))
                      (declare (ignore f14-1 f14-2))
                      0))
               (multiple-value-call #'%f14 (values f9-2)))
             '(1 2 3))
            -1)))
    (apply #'%f9
           (list 0
                 (complex (complex
                           (multiple-value-call #'%f9 (values a))
                           0)
                          0)))))

==>

; in: DEFUN F337
; (COMPLEX (COMPLEX (MULTIPLE-VALUE-CALL #'CL-TEST::%F9 (VALUES CL-TEST::A)) 0)
; 0)
;
; caught WARNING:
; Derived type of (COMPLEX (MULTIPLE-VALUE-CALL #'%F9 (VALUES A)) 0) is
; (VALUES (COMPLEX RATIONAL) &OPTIONAL),
; conflicting with its asserted type
; REAL.
; See also:
; The SBCL Manual, Node "Handling of Types"
;
; compilation unit finished
; caught 1 WARNING condition

(f337 17)

==>

Value of (COMPLEX (MULTIPLE-VALUE-CALL #'%F9 (VALUES A)) 0) in
(COMPLEX (COMPLEX (MULTIPLE-VALUE-CALL #'%F9 (VALUES A)) 0) 0)
is
  0,
not a
  REAL.

Changed in sbcl:
assignee: nobody → Christophe Rhodes (csr21-cantab)
status: New → In Progress
Changed in sbcl:
status: In Progress → Fix Committed
assignee: Christophe Rhodes (csr21-cantab) → nobody
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.