[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
obnoxious overoptimizing compiler bug
- To: (BUG LISPM) at MIT-AI
- Subject: obnoxious overoptimizing compiler bug
- From: Zvona at MIT-AI (David Chapman)
- Date: Wed ,9 Jul 80 19:37:00 EDT
In system 29.96 NWS, with microcode 669, on LISP Machine Two:
(defun foo (x) (and (memq x '(foo bar baz)) t))
Is compiled so that if x memq '(foo bar baz) the result of that call is returned, rather
than t.
(defun bar (x) (and (memq x '(foo bar baz)) 'gazork)) is, of course, compiled properly.
This is not what AND is documented as doing. FOO is actually a reasonable thing to want
to do, to get a pure predicate, so that, eg, we could see if a and b had the same foo
value with (eq (foo a) (foo b)).