summary refs log tree commit diff stats
path: root/tests/vm/toverflowopcsubimmint.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/toverflowopcsubimmint.nim')
-rw-r--r--tests/vm/toverflowopcsubimmint.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/vm/toverflowopcsubimmint.nim b/tests/vm/toverflowopcsubimmint.nim
new file mode 100644
index 000000000..08356590c
--- /dev/null
+++ b/tests/vm/toverflowopcsubimmint.nim
@@ -0,0 +1,10 @@
+discard """
+  errormsg: "over- or underflow"
+"""
+
+static:
+  proc p =
+    var x = int64.low
+    discard x - 1
+    doAssert false
+  p()