Invalid C code emitted for nested let/flet/flet
Compiling the following code:
(defun test-fun (arg form)
(let*
((m 'list))
(labels
((f () (funcall m)))
(labels
( (g (&rest args)
(if args (apply #'f arg args) (f))))
(g form)))))
leads to aux_closure
being used but undefined (and gcc
returning an error).
(This is actually an expanded/simplified version of hu.dwim.walker
code)
Merging two flet
into a single labels
or replacing (if args …
with (if t …
or replacing (funcall m)
with (funcall 'list)
doesn't create undefined variable reference in the emitted C code.