summaryrefslogtreecommitdiff
path: root/libraries/base
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-03-29 17:26:05 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-04-04 08:12:24 -0400
commit6c0dd085c16bad20f6604ce608df6db275d6bca9 (patch)
tree93f1423582294e6964da84b229cff03205daaa8d /libraries/base
parent51fd357119b357c52e990ccce9059c423cc49406 (diff)
downloadhaskell-6c0dd085c16bad20f6604ce608df6db275d6bca9.tar.gz
testsuite: Add testcase for #16111
Diffstat (limited to 'libraries/base')
-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, [''])