Opened 12 years ago

Closed 12 years ago

#411 closed defect (fixed)

error when compiling arith expression

Reported by: gz Owned by: gb
Priority: critical Milestone:
Component: Compiler Version:
Keywords: Cc:


(defconstant $1hour 3600) 
(defun foo (i) 
  (loop with start-delay = $1hour 
        with duration = $1hour 
        collect (loop for i from 0 below 5 
                      as departure = (+ 3416133997 start-delay (* i duration)) 
                      collect departure)))

Results in:

 Error: 27329071976 : value doesn't match constraint :S32CONST in template for CCL::ADD-CONSTANT . 

(in both trunk and working-0711)

Change History (3)

comment:1 Changed 12 years ago by rme

simpler test case:

(defun foo (i)
  (let ((x 0))
    (+ 3416133997 x)))

comment:2 Changed 12 years ago by gb

  • Status changed from new to assigned

I'll try to check in a fix for this soon.

comment:3 Changed 12 years ago by gb

  • Resolution set to fixed
  • Status changed from assigned to closed

I think that this was fixed in r11667: don't try to use ADD-CONSTANT unless one argument is a fixnum whose boxed representation fits in 32 bits.

Note: See TracTickets for help on using tickets.