diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2017-04-24 13:15:47 -0400 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2017-04-24 13:16:19 -0400 |
commit | 1c27e5b3932cb0b7c3fe2fa3b43a0eae9253b833 (patch) | |
tree | bb564838d0485651bdd8c76c350743c5e9be639e | |
parent | 6f9f5ff16599814d8b10869be6dd424a5f7645d8 (diff) | |
download | haskell-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.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/all.T | 1 |
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, ['']) |