aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/gc/dcl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gc/dcl.c')
-rw-r--r--src/cmd/gc/dcl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/gc/dcl.c b/src/cmd/gc/dcl.c
index 83be82f92f..335d056a06 100644
--- a/src/cmd/gc/dcl.c
+++ b/src/cmd/gc/dcl.c
@@ -1241,9 +1241,14 @@ funccompile(Node *n, int isclosure)
stksize = 0;
dclcontext = PAUTO;
funcdepth = n->funcdepth + 1;
+ hasgoto = 0;
compile(n);
+ if(hasgoto)
+ clearstk();
curfn = nil;
funcdepth = 0;
dclcontext = PEXTERN;
}
+
+