[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiler bug?



	From: Hong-Tai Chou, MCC
	Subject: compiler bug?

	We are having a strange problem with a piece of code compiled
	with safety level 2.
	...
	In particular, the "fix" macro call in the C code
	"base[2]= aset1(base[0],V1,fix(base[1]));"
	for (setf (aref x (decf i)) (aref x 1)) is suspicious.
	...

Yes, it's a compiler bug.
The bug was in the definition of the Lisp function INLINE-ARGS in
file cmpnew/cmpinline.lsp.  To fix the bug, replace the SETQ form
(marked =>) in the T clause of the COND form in the SETQ clause
in the big CASE form in the definition of INLINE-ARGS.  (Sorry, it's a
very very big definition.)

        (case (car form)
              (LOCATION ..)
              (VAR ..)
              (CALL-GLOBAL ..)
              (structure-ref ..)
              (SETQ
               (let (..)
                 (let ..)
                 (cond (..)
                       (t (setq forms ..)
=>                        (setq types (list* type type types))))))
              (t ..))

with

=>                        (setq types (list* type type (cdr types)))))))

-- Taiichi

PS.  Again, please keep it in mind that the title of your
bug report be something that can identify the sort of the bug.
Thank you.