summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-10-20 22:37:31 +0200
committerGitHub <noreply@github.com>2019-10-20 22:37:31 +0200
commit38b3590e40b7267195c65168e6ff064775de4339 (patch)
tree470130ede0af04c3209a2bd33531427759670acd /tests
parentec20fd35447fea2a5da8538260397cea24051db5 (diff)
downloadNim-38b3590e40b7267195c65168e6ff064775de4339.tar.gz
fixes #12310 [backport] (#12470)
Diffstat (limited to 'tests')
-rw-r--r--tests/vm/tmisc_vm.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/vm/tmisc_vm.nim b/tests/vm/tmisc_vm.nim
index 7d7275426..57dc526c5 100644
--- a/tests/vm/tmisc_vm.nim
+++ b/tests/vm/tmisc_vm.nim
@@ -200,3 +200,17 @@ const
   vmCrash = oh_no()
 
 debugEcho vmCrash
+
+
+# bug #12310
+
+proc someTransform(s: var array[8, uint64]) =
+  var s1 = 5982491417506315008'u64
+  s[1] += s1
+
+static:
+  var state: array[8, uint64]
+  state[1] = 7105036623409894663'u64
+  someTransform(state)
+
+  doAssert state[1] == 13087528040916209671'u64