mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-01 11:34:43 +00:00
fixes #14623
This commit is contained in:
15
tests/stdlib/tvolatile.nim
Normal file
15
tests/stdlib/tvolatile.nim
Normal file
@@ -0,0 +1,15 @@
|
||||
import std/[volatile, assertions]
|
||||
|
||||
var st: int
|
||||
var foo: ptr int = addr st
|
||||
volatileStore(foo, 12)
|
||||
doAssert volatileLoad(foo) == 12
|
||||
|
||||
# bug #14623
|
||||
proc bar =
|
||||
var st: int
|
||||
var foo: ptr int = addr st
|
||||
volatileStore(foo, 12)
|
||||
doAssert volatileLoad(foo) == 12
|
||||
|
||||
bar()
|
||||
Reference in New Issue
Block a user