summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-03-29 17:26:05 -0400
committerBen Gamari <ben@smart-cactus.org>2019-03-30 01:28:01 -0400
commit3acdc9a8844a5f9bddf27379b3e74c2bb94bff5f (patch)
tree2cef5177a0bfd3c6af816876bb14adf19c293b59
parent4acdb769705de63c721555e70bef5c3dff87e3c5 (diff)
downloadhaskell-wip/T16111.tar.gz
testsuite: Add testcase for #16111wip/T16111
-rw-r--r--libraries/base/tests/T16111.hs13
-rw-r--r--libraries/base/tests/T16111.stderr2
-rw-r--r--libraries/base/tests/all.T1
3 files changed, 16 insertions, 0 deletions
diff --git a/libraries/base/tests/T16111.hs b/libraries/base/tests/T16111.hs
new file mode 100644
index 0000000000..241714ea13
--- /dev/null
+++ b/libraries/base/tests/T16111.hs
@@ -0,0 +1,13 @@
+module Main (main) where
+
+import Data.Bits
+import Data.Word
+
+main :: IO ()
+main = print $ toInteger (shiftL 1 hm :: Word64)
+ == toInteger (shiftL 1 hm :: Word64)
+
+hm :: Int
+hm = -1
+{-# NOINLINE hm #-}
+
diff --git a/libraries/base/tests/T16111.stderr b/libraries/base/tests/T16111.stderr
new file mode 100644
index 0000000000..7562f9de58
--- /dev/null
+++ b/libraries/base/tests/T16111.stderr
@@ -0,0 +1,2 @@
+T16111: arithmetic overflow
+
diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T
index dc16246129..86c3ec9477 100644
--- a/libraries/base/tests/all.T
+++ b/libraries/base/tests/all.T
@@ -235,3 +235,4 @@ test('T10412', normal, compile_and_run, [''])
test('T13896', normal, compile_and_run, [''])
test('T13167', normal, compile_and_run, [''])
test('T15349', [exit_code(1), expect_broken_for(15349, 'ghci')], compile_and_run, [''])
+test('T16111', exit_code(1), compile_and_run, [''])