Steel Bank Common Lisp

Type error in SB-C::INTEGER-TYPE-NUMERIC-BOUNDS

Reported by Paul F. Dietz on 2013-07-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Medium
Unassigned

Bug Description

In SBCL 1.1.9 (x86-64), compilation of this function aborts:

(defun test-20130708-1 (b)
  (declare (type (integer -1225923945345 -832450738898) b))
  (declare (optimize (speed 3) (space 3) (safety 2) (debug 0) (compilation-speed 1)))
  (loop for lv1 below 3
     sum (logorc2
   (if (>= 0 lv1)
       (ash b (min 25 lv1))
       0)
   -2)))

==>

 The value NIL is not of type REAL.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY ] Retry EVAL of current toplevel form.
  1: [CONTINUE] Ignore error and continue loading file "/home/dietz/t2.lsp".
  2: [ABORT ] Abort loading file "/home/dietz/t2.lsp".
  3: Exit debugger, returning to top level.

(SB-C::INTEGER-TYPE-NUMERIC-BOUNDS #<SB-KERNEL:UNION-TYPE (OR (INTEGER 1 1) (INTEGER * -1))>)

This was found by the usual random testing.

Paul Khuong (pvk) on 2013-07-08
Changed in sbcl:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Paul Khuong (pvk)
Paul Khuong (pvk) wrote :

Fixed in 220651c (Handle unbounded integer types in INTEGER-TYPE-NUMERIC-BOUNDS).

Thank you for running the random tester; I'm hoping not to hear from it again on modular arithmetic issues ;)

Changed in sbcl:
status: Confirmed → Fix Committed
assignee: Paul Khuong (pvk) → nobody
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers