Skip to content
Snippets Groups Projects
Commit 9587726f authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

testsuite: Add testcase for #21141

parent e7c4719d
No related branches found
No related tags found
No related merge requests found
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE LambdaCase #-}
module Main where
import GHC.Prim.Exception
import GHC.Exception.Type
import Control.Exception
import System.Mem
main ::IO ()
main = do
-- evaluate the CAF
evaluate raiseUnderflow
`catch` \case
Underflow -> pure ()
e -> putStrLn "Unexpected exception"
-- free it with buggy compiler
performGC
-- reuse it
evaluate raiseUnderflow
`catch` \case
Underflow -> pure ()
e -> putStrLn "Unexpected exception"
...@@ -216,6 +216,7 @@ test('CallConv', [when(unregisterised(), skip), ...@@ -216,6 +216,7 @@ test('CallConv', [when(unregisterised(), skip),
when(arch('x86_64'), extra_hc_opts('CallConv_x86_64.s')), when(arch('x86_64'), extra_hc_opts('CallConv_x86_64.s')),
when(arch('aarch64'), extra_hc_opts('CallConv_aarch64.s'))], when(arch('aarch64'), extra_hc_opts('CallConv_aarch64.s'))],
compile_and_run, ['']) compile_and_run, [''])
test('T21141', normal, compile_and_run, [''])
test('T21186', normal, compile_and_run, ['']) test('T21186', normal, compile_and_run, [''])
test('T20640a', normal, compile_and_run, ['']) test('T20640a', normal, compile_and_run, [''])
test('T20640b', normal, compile_and_run, ['']) test('T20640b', normal, compile_and_run, [''])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment