Activity log for bug #365497

Date Who What changed Old value New value Message
2009-04-23 11:49:09 Nikodemus Siivola bug added bug
2009-04-23 11:49:25 Nikodemus Siivola sbcl: importance Undecided Medium
2009-04-23 11:49:25 Nikodemus Siivola sbcl: status New Confirmed
2010-01-18 06:30:20 Stas Boukarev description Reported by Stas Boukarev on sbcl-devel. (loop for i from most-negative-fixnum to most-positive-fixnum count i)) expands into (BLOCK NIL (LET ((I MOST-NEGATIVE-FIXNUM)) (DECLARE (TYPE (AND REAL NUMBER) I)) (LET ((#:LOOP-SUM-899 0)) (DECLARE (TYPE FIXNUM #:LOOP-SUM-899)) (SB-LOOP::LOOP-BODY NIL (NIL NIL (WHEN (> I '536870911) (GO SB-LOOP::END-LOOP)) NIL) ((WHEN I (SETQ #:LOOP-SUM-899 (1+ #:LOOP-SUM-899)))) (NIL (SB-LOOP::LOOP-REALLY-DESETQ I (1+ I)) (WHEN (> I '536870911) (GO SB-LOOP::END-LOOP)) NIL) ((RETURN-FROM NIL #:LOOP-SUM-899)))))) Where counter has type FIXNUM even though the count becomes a bignum. Note also the (AND REAL NUMBER) declaration for I: smarter placement of the termination test would allow a FIXNUM declaration there. Reported by Stas Boukarev on sbcl-devel. (loop for i from most-negative-fixnum to most-positive-fixnum       count i)) expands into (BLOCK NIL   (LET ((I MOST-NEGATIVE-FIXNUM))     (DECLARE (TYPE (AND REAL NUMBER) I))     (LET ((#:LOOP-SUM-899 0))       (DECLARE (TYPE FIXNUM #:LOOP-SUM-899))       (SB-LOOP::LOOP-BODY NIL                           (NIL NIL                            (WHEN (> I '536870911) (GO SB-LOOP::END-LOOP)) NIL)                           ((WHEN I (SETQ #:LOOP-SUM-899 (1+ #:LOOP-SUM-899))))                           (NIL (SB-LOOP::LOOP-REALLY-DESETQ I (1+ I))                            (WHEN (> I '536870911) (GO SB-LOOP::END-LOOP)) NIL)                           ((RETURN-FROM NIL #:LOOP-SUM-899)))))) Where counter has type FIXNUM even though the count becomes a bignum. Note also the (AND REAL NUMBER) declaration for I: smarter placement of the termination test would allow a FIXNUM declaration there.