Another derived double type

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

Bug Description

(lambda (a)
  (let ((v3 (mod -942847873023899 (min -21 a))))
    (if (> v3 0)
        (the integer v3)
        0)))

==>

; in: LAMBDA (A)
; (THE INTEGER V3)
;
; caught WARNING:
; Derived type of V3 is
; (VALUES (OR (DOUBLE-FLOAT (0.0d0)) (SINGLE-FLOAT (0.0))) &OPTIONAL),
; conflicting with its asserted type
; INTEGER.
; See also:
; The SBCL Manual, Node "Handling of Types"
;
; compilation unit finished
; caught 1 WARNING condition
#<FUNCTION (LAMBDA (A)) {5366EB2B}>

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

It's kinda right, though. (the integer v3) is not dead code because of floating points.

(mod -942847873023899 -96.58375706110911d0) => 0.125d0

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

I had thought the missing integer possibility in the type was a bug, but that's not the case. That branch is not dead because of float weirdness.

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