Trac 32: Type derivation bug for floor
From Trac 32.
The following code generates lots of compiler notes. I don't think the compiler should generate any notes. The issue, I think, comes from the maybe-inline definition of FLOOR. The derived types for q1
, r1
, q2
, and r2
are also too general. If space > 0, then the derived types are the expected values (VALUES (MOD 19) (MOD 588) (MOD 21) (MOD 28))
(defun bug (code)
(declare (optimize (speed 3) (space 0))
(type (integer #xAC00 #xD7A3) code))
(multiple-value-bind (q1 r1)
(floor (- code #xAC00) 588)
(multiple-value-bind (q2 r2)
(floor r1 28)
(values q1 r1 q2 r2))))