Ralf Juengling | 1 Oct 2009 01:18
Picon

nasty compiler bug


I just stumbled across the bug exhibited by the code
below. Strange that this has gone undetected for so long.

Ralf

(defclass C object
   ((-int-) count) )

(defmethod C C (i)
   (declare (-int-) i)
   (setq count i)
   ())

(defmethod C incr ()
   (incr count)
   (incr count)
   ())

(defmethod C do ()
   (let ((count0 count))
     (declare (-int-) count0)
     (==> this incr)
     (printf "%d\n" (- count count0)) )
   ())

(let ((obj (new C 1)))
   (==> obj do) )

(dhc-make ()
(Continue reading)


Gmane