summary refs log tree commit diff stats
path: root/tests/vm/toverflowopcmulint.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/toverflowopcmulint.nim')
-rw-r--r--tests/vm/toverflowopcmulint.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/vm/toverflowopcmulint.nim b/tests/vm/toverflowopcmulint.nim
new file mode 100644
index 000000000..81b3234ba
--- /dev/null
+++ b/tests/vm/toverflowopcmulint.nim
@@ -0,0 +1,11 @@
+discard """
+  errormsg: "over- or underflow"
+"""
+
+static:
+  proc p =
+    var
+      x = 1 shl 62
+    discard x * 2
+    assert false
+  p()