Clozure / ccl

Clozure Common Lisp
http://ccl.clozure.com
Apache License 2.0
855 stars 103 forks source link

Compiler bug involving tag collision and labels function inlining #493

Open pfdietz opened 5 months ago

pfdietz commented 5 months ago
(defun bug392 ()
  (let ((lam
         '(lambda ()
           (tagbody (labels ((%f () (go 5)))
                      (declare (inline %f))
                      (tagbody 5 (%f)))
            5)
           nil)))
    (funcall (compile nil lam))))

This function, when called, loops infinitely. I suspect the compiler is getting the two "5" tags confused.

"Version 1.12.2 (v1.12.2) LinuxX8664"

pfdietz commented 5 months ago

The bug also occurs when FLET is used instead of LABELS.