mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-19 01:18:32 +00:00
@@ -577,6 +577,9 @@ proc trackOperand(tracked: PEffects, n: PNode, paramType: PType) =
|
||||
markGcUnsafe(tracked, a)
|
||||
elif tfNoSideEffect notin op.flags:
|
||||
markSideEffect(tracked, a)
|
||||
if paramType != nil and paramType.kind == tyVar:
|
||||
if n.kind == nkSym and isLocalVar(tracked, n.sym):
|
||||
makeVolatile(tracked, n.sym)
|
||||
notNilCheck(tracked, n, paramType)
|
||||
|
||||
proc breaksBlock(n: PNode): bool =
|
||||
|
||||
14
tests/ccgbugs/t5296.nim
Normal file
14
tests/ccgbugs/t5296.nim
Normal file
@@ -0,0 +1,14 @@
|
||||
discard """
|
||||
cmd: "nim c -d:release $file"
|
||||
output: 1
|
||||
"""
|
||||
|
||||
proc bug() : void =
|
||||
var x = 0
|
||||
try:
|
||||
inc x
|
||||
raise new(Exception)
|
||||
except Exception:
|
||||
echo x
|
||||
|
||||
bug()
|
||||
Reference in New Issue
Block a user