summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-07-09 17:24:23 +0200
committerGitHub <noreply@github.com>2020-07-09 17:24:23 +0200
commitc38a459582fb4744ce4abcba2d278b48857c0a31 (patch)
tree588d4f61ae18a8b896f37eb6f4d536e811da9f97 /compiler
parent64815f59b277ce03e7dd74d9d42a9058379852ec (diff)
downloadNim-c38a459582fb4744ce4abcba2d278b48857c0a31.tar.gz
fixes #14925 (#14947)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgstmts.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim
index 532272374..c56340e00 100644
--- a/compiler/ccgstmts.nim
+++ b/compiler/ccgstmts.nim
@@ -1218,6 +1218,10 @@ proc genTryGoto(p: BProc; t: PNode; d: var TLoc) =
   p.nestedTryStmts.add((fin, false, Natural lab))
 
   p.flags.incl nimErrorFlagAccessed
+
+  if not isEmptyType(t.typ) and d.k == locNone:
+    getTemp(p, t.typ, d)
+
   expr(p, t[0], d)
 
   if 1 < t.len and t[1].kind == nkExceptBranch: