summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-06 00:06:03 -0400
committerBen Gamari <ben@smart-cactus.org>2022-08-08 10:18:13 -0400
commit3c5752cc409575e1beace88e9bc6e73481485aaf (patch)
tree214be6b1efb9454a6d7ced24a9a49ff9eb3745de
parent9465b8f7c73b156afb058bde32e68a01965f14a0 (diff)
downloadhaskell-wip/T19143.tar.gz
testsuite: Add test for #21962wip/T19143
-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, [''])