summary refs log tree commit diff stats
path: root/tests/vm/tmisc_vm.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/tmisc_vm.nim')
-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