fixes #1539
This commit is contained in:
parent
eb69b81859
commit
c2b223688d
4 changed files with 38 additions and 119 deletions
20
tests/ccgbugs/tmissingvolatile.nim
Normal file
20
tests/ccgbugs/tmissingvolatile.nim
Normal file
|
|
@ -0,0 +1,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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue