summary refs log tree commit diff stats
path: root/tests/ccgbugs/tmissingvolatile.nim
blob: b877eff71c3a5b07e0ab01571d89f2c9127ca833 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
discard """
  output: "1"
  cmd: r"nim c --hints:on $options --mm:refc -d:release $file"
  ccodecheck: "'NI volatile state;'"
  targets: "c"
"""

# bug #1539

proc err() =
  raise newException(Exception, "test")

proc main() =
  var state: int
  try:
    state = 1
    err()
  except:
    echo state

main()