From 1c050ed26f50f3a8788e650f23d6ff55badc1072 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Mon, 23 Jan 2023 13:57:05 +0000 Subject: Add test for T22671 This was fixed by b13c6ea5 Closes #22671 --- testsuite/tests/numeric/should_run/T22671.hs | 8 ++++++++ testsuite/tests/numeric/should_run/all.T | 1 + 2 files changed, 9 insertions(+) create mode 100644 testsuite/tests/numeric/should_run/T22671.hs 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']) -- cgit v1.2.1