shithub: mc

Download patch

ref: e3682d0bb7437dc3cbb6a6fcf8d82806d98c73da
parent: e6811668a36f0bfaa6abe113bc25ed99473f8973
author: Mura Li <mural@ctli.io>
date: Mon Jul 5 07:40:44 EDT 2021

mi/match: fix internal compiler error
There could be more than one frontiers for each match arm.

Signed-off-by: Mura Li <mural@ctli.io>

--- a/mi/match.c
+++ b/mi/match.c
@@ -980,7 +980,7 @@
 
 	for (i = 0; i < nfrontier; i++)
 		if (frontier[i]->final->refcnt == 0)
-			fatal(pat[i], "pattern matched by earlier case");
+			fatal(pat[frontier[i]->i], "pattern matched by earlier case");
 
 	if (debugopt['M'] || getenv("M")) {
 		dbgloc = strdup(getenv("M"));