summaryrefslogtreecommitdiff
path: root/testsuite/tests/primops
diff options
context:
space:
mode:
authorReid Barton <rwbarton@gmail.com>2015-07-31 17:09:45 -0400
committerReid Barton <rwbarton@gmail.com>2015-07-31 17:09:46 -0400
commitad089f58be522cb68c0306c21c5df9d72b6c0aff (patch)
treeb02d2f64e437b7ad932b55dac9426b208ca07c73 /testsuite/tests/primops
parent8f81af9a133d443720f597ba81ac5a2c5fcc2c3d (diff)
downloadhaskell-ad089f58be522cb68c0306c21c5df9d72b6c0aff.tar.gz
Give raise# a return type of open kind (#10481)
Test Plan: validate Reviewers: austin, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1116 GHC Trac Issues: #10481
Diffstat (limited to 'testsuite/tests/primops')
-rw-r--r--testsuite/tests/primops/should_run/T10481.hs9
-rw-r--r--testsuite/tests/primops/should_run/T10481.stderr1
-rw-r--r--testsuite/tests/primops/should_run/all.T1
3 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/primops/should_run/T10481.hs b/testsuite/tests/primops/should_run/T10481.hs
new file mode 100644
index 0000000000..bfdb35626e
--- /dev/null
+++ b/testsuite/tests/primops/should_run/T10481.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE MagicHash #-}
+
+import GHC.Exts
+import Control.Exception
+
+f :: ArithException -> Int#
+f x = raise# (toException x)
+
+main = print (I# (f Overflow))
diff --git a/testsuite/tests/primops/should_run/T10481.stderr b/testsuite/tests/primops/should_run/T10481.stderr
new file mode 100644
index 0000000000..228377ee73
--- /dev/null
+++ b/testsuite/tests/primops/should_run/T10481.stderr
@@ -0,0 +1 @@
+T10481: arithmetic overflow
diff --git a/testsuite/tests/primops/should_run/all.T b/testsuite/tests/primops/should_run/all.T
index 12f94913d3..b21279aa99 100644
--- a/testsuite/tests/primops/should_run/all.T
+++ b/testsuite/tests/primops/should_run/all.T
@@ -2,3 +2,4 @@ test('T6135', normal, compile_and_run, [''])
test('T7689', normal, compile_and_run, [''])
# The test is using unboxed tuples, so omit ghci
test('T9430', omit_ways(['ghci']), compile_and_run, [''])
+test('T10481', exit_code(1), compile_and_run, [''])