summary refs log tree commit diff stats
path: root/tests/ccgbugs/tmissingvolatile.nim
blob: 1eccdc6b1b04b71fe8b7ca050e7fc3bcd71a88fb (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 -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()