[Openmcl-devel] Inlining bug?

Gary Byers gb at clozure.com
Fri Jun 15 19:31:20 UTC 2007


If I checked in the right file to the right place, the fix should show
up in CVS in about 45 minutes.

On Fri, 15 Jun 2007, Jared C. Davis wrote:

> Hi,
>
> It seems like inlining breaks the following code on 1.1-pre-070512
> (LinuxX8664) and also on
> 1.1-pre-070408 (LinuxX8664).
>
> When I remove any of the "(declaim (inline ...))" calls, (len '(1 2
> 3)) correctly returns 3.  But when they are all present, it
> incorrectly returns 0.
>
>   (declaim (inline natp))
>   (declaim (inline nfix))
>   (declaim (inline nat+))
>
>   (defun natp (x)
>     (and (integerp x)
>          (<= 0 x)))
>
>   (defun nfix (x)
>     (if (natp x) x 0))
>
>   (defun nat+ (a b)
>     (+ (nfix a) (nfix b)))
>
>   (defun len (x)
>     (if (consp x)
>         (nat+ 1 (len (cdr x)))
>       0))
>
>   (len '(1 2 3))  ;; Incorrectly returns 0 instead of 3
>
> Thanks,
>   Jared
>
> -- 
> Jared C. Davis <jared at cs.utexas.edu>
> 3600 Greystone Drive #604
> Austin, TX 78731
> http://www.cs.utexas.edu/users/jared/
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list