summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2023-01-23 13:57:05 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-24 05:39:08 -0500
commit1c050ed26f50f3a8788e650f23d6ff55badc1072 (patch)
treead0715762df444f5c96f5947b8523e0e17657428
parent34d2d4635ee2f7eb878b4dacb68fa7b066dd16e0 (diff)
downloadhaskell-1c050ed26f50f3a8788e650f23d6ff55badc1072.tar.gz
Add test for T22671
This was fixed by b13c6ea5 Closes #22671
-rw-r--r--testsuite/tests/numeric/should_run/T22671.hs8
-rw-r--r--testsuite/tests/numeric/should_run/all.T1
2 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/numeric/should_run/T22671.hs b/testsuite/tests/numeric/should_run/T22671.hs
new file mode 100644
index 0000000000..3756d1aef8
--- /dev/null
+++ b/testsuite/tests/numeric/should_run/T22671.hs
@@ -0,0 +1,8 @@
+module Main where
+
+import Data.Bits
+import Control.Monad
+
+main :: IO ()
+main = unless (length (show (1 `shiftL` (1 `shiftL` 20) :: Integer)) == 315653)
+ (error "Incorrect result for bignum calculation")
diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T
index f2854ff1d4..bf6d59323b 100644
--- a/testsuite/tests/numeric/should_run/all.T
+++ b/testsuite/tests/numeric/should_run/all.T
@@ -79,4 +79,5 @@ test('IntegerToFloat', normal, compile_and_run, [''])
test('T20291', normal, compile_and_run, [''])
test('T22282', normal, compile_and_run, [''])
+test('T22671', normal, compile_and_run, [''])
test('foundation', normal, compile_and_run, ['-O -package transformers'])