]> git.eshelyaron.com Git - emacs.git/commitdiff
fix comp-limplify-block when falling through a return
authorAndrea Corallo <akrl@sdf.org>
Sun, 20 Oct 2019 09:02:16 +0000 (11:02 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:37:57 +0000 (11:37 +0100)
lisp/emacs-lisp/comp.el

index fe3c1dde93e08f34f31a22a43786a3ebf805a3c3..03ace885f855e2951aa64474d2068694a67f4d88 100644 (file)
@@ -1054,10 +1054,10 @@ The block name is returned."
    do (comp-limplify-lap-inst inst)
       (cl-incf (comp-limplify-pc comp-pass))
       (pcase next-inst
-        (`(TAG ,_label . ,target-sp)
+        (`(TAG ,_label . ,label-sp)
          (when fall-through
-           (cl-assert (= (1- target-sp) (comp-sp))))
-         (let ((next-bb (comp-add-pending-block (comp-sp))))
+           (cl-assert (= (1- label-sp) (comp-sp))))
+         (let ((next-bb (comp-add-pending-block (1- label-sp))))
            (when fall-through
              (comp-emit `(jump ,next-bb))))
          (return)))