From 5ac646f89f56b0c2b33c012a05c8416068c7e921 Mon Sep 17 00:00:00 2001 From: bal Date: Mon, 18 Nov 1985 16:55:53 +0000 Subject: [PATCH] Yet another bug reported by sater. --- mach/proto/ncg/codegen.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/mach/proto/ncg/codegen.c b/mach/proto/ncg/codegen.c index 475d17d9a..7894a1b62 100644 --- a/mach/proto/ncg/codegen.c +++ b/mach/proto/ncg/codegen.c @@ -565,14 +565,18 @@ normalfailed: if (stackpad!=tokpatlen) { * property. If none then some stacking has to take place. */ if (npos==0) { - if (stackheight<=tokpatlen) { - if (!toplevel) { - BROKE(); - } else - fatal("No regs available"); - } - totalcost += stackupto( &fakestack[0],ply,toplevel); - CHKCOST(); + if (stackheight<=tokpatlen) { + if (!toplevel) { + BROKE(); + } else { + if (paniced) + fatal("No regs available"); + totalcost += stackupto( &fakestack[0],ply,toplevel); + goto panic; + } + } + totalcost += stackupto( &fakestack[0],ply,toplevel); + CHKCOST(); } } while (npos==0); if (!exactmatch) { -- 2.34.1