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

# bug #1539

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

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

main()