Files
Nim/tests/ccgbugs/tmissingvolatile.nim
ringabout 51edd9bd60 always mangle local variables (#24681)
ref #24677

(cherry picked from commit 1af88a2d20)
2025-03-03 14:05:46 +01:00

22 lines
310 B
Nim

discard """
output: "1"
cmd: r"nim c --hints:on $options --mm:refc -d:release $file"
ccodecheck: "'NI volatile state_1;'"
targets: "c"
"""
# bug #1539
proc err() =
raise newException(Exception, "test")
proc main() =
var state: int
try:
state = 1
err()
except:
echo state
main()