[Openmcl-devel] Is this a bug in let/let*?

Gary Byers gb at clozure.com
Tue Oct 23 17:43:53 PDT 2007

It's the same bug as:


I think that it was first reported last spring, fixed, apparently broken
again, fixed around the time of the bug report above, broken by excessive
zeal in "fixing" a similar case that wasn't wrong, then fixed again.
AFAICT, it's fixed in CVS/svn at the moment.

The case that fails has to do with the fact that that devolves into (>
3 0), but that isn't apparent until most attempts at constant-folding
have tried and failed; the x86-64 backend didn't notice that both
operands to > were constants, and in trying to tranlate "compare value
of expression to constant" to "compare constant to value" thought that
it had turn:

(> exp 0)


(< 0 exp)

It didn't account for the possibility of "exp" also being constant-valued,
so the > was turned into a < incorrectly.

On Tue, 23 Oct 2007, Raffael Cavallaro wrote:

> ? (alpha-char-p #\e)
> T
> ? (let ((a #\e))
>     (alpha-char-p a))
> T
> ? (plusp 3)
> T
> ? (let ((a 3))
>     (plusp a))
> ?
> Is this a bug in let (it also appears in let*) or is this some odd
> corner of the spec I'm unfamiliar with?
> btw, I'm using Clozure Common Lisp version 0.1 (0.2) under Leopard.
> Same oddity in OpenMCL Version 1.1-r7330 (DarwinX8664).
> regards,
> Ralph
> Raffael Cavallaro, Ph.D.
> raffaelcavallaro at mac.com
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

More information about the Openmcl-devel mailing list