summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-06 00:06:03 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-08 19:39:57 -0400
commite5ceff56a6f11e4adc17a7cc05645b3e3a66ab97 (patch)
treed53170ef30e1cafb764b4b0ff25a61868e341281
parent50912d689b6c405f979fd786cf2858d04552fc29 (diff)
downloadhaskell-e5ceff56a6f11e4adc17a7cc05645b3e3a66ab97.tar.gz
testsuite: Add test for #21962
-rw-r--r--testsuite/tests/array/should_run/T21962.hs11
-rw-r--r--testsuite/tests/array/should_run/all.T1
2 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/array/should_run/T21962.hs b/testsuite/tests/array/should_run/T21962.hs
new file mode 100644
index 0000000000..1858486ef8
--- /dev/null
+++ b/testsuite/tests/array/should_run/T21962.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE UnboxedTuples #-}
+{-# LANGUAGE MagicHash #-}
+
+module Main where
+
+import GHC.IO
+import GHC.Exts
+
+main :: IO ()
+main = do
+ IO $ \s0 -> case newArray# 0# () s0 of (# s1, arr #) -> (# s1, () #)
diff --git a/testsuite/tests/array/should_run/all.T b/testsuite/tests/array/should_run/all.T
index 3dac0eb681..e559635162 100644
--- a/testsuite/tests/array/should_run/all.T
+++ b/testsuite/tests/array/should_run/all.T
@@ -23,3 +23,4 @@ test('arr017', when(fast(), skip), compile_and_run, [''])
test('arr018', when(fast(), skip), compile_and_run, [''])
test('arr019', normal, compile_and_run, [''])
test('arr020', normal, compile_and_run, [''])
+test('T21962', normal, compile_and_run, [''])