Commit 90f39e87 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add a test for trac #1042

parent dcdd1eb0
......@@ -41,6 +41,7 @@ test('num009', skip_if_fast, compile_and_run, [''])
test('num010', skip_if_fast, compile_and_run, [''])
test('num011', skip_if_fast, compile_and_run, [''])
test('num012', skip_if_fast, compile_and_run, [''])
test('num013', skip_if_fast, compile_and_run, [''])
test('arith016', compose(skip_if_fast,only_compiler_types(['ghc'])), compile_and_run, ['-fglasgow-exts'])
test('arith017', skip_if_fast, compile_and_run, [''])
test('arith018', skip_if_fast, compile_and_run, [''])
......
-- Test for trac #1042
import Control.Exception
import Data.Int
import Data.Word
import Prelude hiding (catch)
main :: IO ()
main = do print ((minBound :: Int) `div` (-1)) `catch` print
print ((minBound :: Int8) `div` (-1)) `catch` print
print ((minBound :: Int16) `div` (-1)) `catch` print
print ((minBound :: Int32) `div` (-1)) `catch` print
print ((minBound :: Int64) `div` (-1)) `catch` print
arithmetic overflow
arithmetic overflow
arithmetic overflow
arithmetic overflow
arithmetic overflow
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