summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2017-04-24 13:15:47 -0400
committerJoachim Breitner <mail@joachim-breitner.de>2017-04-24 13:16:19 -0400
commit1c27e5b3932cb0b7c3fe2fa3b43a0eae9253b833 (patch)
treebb564838d0485651bdd8c76c350743c5e9be639e
parent6f9f5ff16599814d8b10869be6dd424a5f7645d8 (diff)
downloadhaskell-1c27e5b3932cb0b7c3fe2fa3b43a0eae9253b833.tar.gz
Add failing test case for T13611
this program should be rejected, but is not (and segfaults).
-rw-r--r--testsuite/tests/typecheck/should_fail/T13611.hs9
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
2 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T13611.hs b/testsuite/tests/typecheck/should_fail/T13611.hs
new file mode 100644
index 0000000000..ea22791dab
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T13611.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE MagicHash, UnboxedTuples #-}
+import GHC.Prim
+import GHC.Types
+
+main = do
+ let local = ()
+ let null = 0## :: Word#
+ let triple = (# local, null, null #)
+ IO (\s -> case mkWeakNoFinalizer# triple () s of (# s, r #) -> (# s, () #))
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index c8d5869d04..8bbb671ba6 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -434,3 +434,4 @@ test('T13300', normal, compile_fail, [''])
test('T12709', normal, compile_fail, [''])
test('T13446', normal, compile_fail, [''])
test('T13506', normal, compile_fail, [''])
+test('T13611', expect_broken(13611), compile_fail, [''])