summary refs log tree commit diff stats
path: root/tests/ccgbugs/tmissingvolatile.nim
blob: 60b1771dc7441157a1bfde0ffd3815c538ba8471 (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;'"
  target: "C"
"""

# bug #1539

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

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

main()