Re: Is this a bug in let/let*?
Gary Byers <[email protected]> Tue, 23 Oct 2007 18:43:53 -0600 (MDT)
| Newsgroups | gmane.lisp.openmcl.devel,gmane.lisp.openmcl.bugs |
|---|---|
| Message-ID | <[email protected]> |
It's the same bug as: <http://www.clozure.com/pipermail/bug-openmcl/2007-October/000515.html> 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) into (< 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)) > NIL > ? > > 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. > [email protected] > > _______________________________________________ > Openmcl-devel mailing list > [email protected] > http://clozure.com/mailman/listinfo/openmcl-devel > >