Armed Bear Common Lisp 1.2.0-dev-svn-14276 Java 1.7.0_04 Oracle Corporation
The warning and error occurs on the second COMPILE call. The AVER is in COMPILE-VAR-REF.
(defun foo (n) n)
(define-compiler-macro foo (n) `(flet ((bar (k) k)) (declare (inline bar)) (bar ,n)))
(compile nil '(lambda () (foo 3))) (compile nil '(lambda () (foo 3)))
; Caught STYLE-WARNING: ; The variable K is defined but never used.
compile-var-ref general case
; Compilation unit finished ; Caught 1 STYLE-WARNING condition
=> Failed AVER: "NIL" [Condition of type SIMPLE-ERROR]