Commit 81378198 authored by Simon Marlow's avatar Simon Marlow
Browse files

add test for out-of-memory

parent d2ffc492
......@@ -20,3 +20,5 @@ test('divbyzero',
exit_code_if_platform(1, 'i386-unknown-mingw32')),
compile_and_run, [''])
test('outofmem', exit_code(1), compile_and_run, [''])
module Main where
import Data.Array.IO
import Control.Monad
main = do
arrs <- sequence $ repeat $ (newArray_ (0,2^28) :: IO (IOUArray Int Int))
-- larger than 2^28 causes other problems...
print (length arrs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment