diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim index b18ea017ed376..aaad53b64bb82 100644 --- a/compiler/ccgcalls.nim +++ b/compiler/ccgcalls.nim @@ -141,7 +141,7 @@ proc fixupCall(p: BProc, le, ri: PNode, d: var TLoc, d.snippet = extract(result) excl d.flags, lfSingleUse else: - if d.k == locNone and p.splitDecls == 0: + if d.k == locNone and p.splitDecls == 0 and p.config.exc != excGoto: d = getTempCpp(p, typ.returnType, extract(result)) else: if d.k == locNone: d = getTemp(p, typ.returnType) diff --git a/tests/stdlib/tpegs.nim b/tests/stdlib/tpegs.nim index 32aab82f2bf74..18753a9beab87 100644 --- a/tests/stdlib/tpegs.nim +++ b/tests/stdlib/tpegs.nim @@ -1,5 +1,5 @@ discard """ - matrix: "--mm:refc; --mm:orc" + matrix: "--mm:refc; --mm:orc; --exceptions:goto" targets: "c cpp js" output: ''' PEG AST traversal output