summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-10-29 10:46:47 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-10-30 12:09:59 +0000
commit04219cf3c20dcb58de2368cbe43e51a61cf25ccd (patch)
tree7445324b1c970de62864490014aca89189090f24 /testsuite
parentbaf9da6591da65879e807f0cc3dbaa66a168670f (diff)
downloadhaskell-04219cf3c20dcb58de2368cbe43e51a61cf25ccd.tar.gz
add test for #7319
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/codeGen/should_run/T7319.hs11
-rw-r--r--testsuite/tests/codeGen/should_run/T7319.stderr5
-rw-r--r--testsuite/tests/codeGen/should_run/all.T6
3 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/T7319.hs b/testsuite/tests/codeGen/should_run/T7319.hs
new file mode 100644
index 0000000000..5159744fdc
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/T7319.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE BangPatterns, MagicHash #-}
+import Control.Exception
+import System.Environment
+import GHC.Exts
+
+main = do
+ args <- getArgs
+ foo args
+
+foo _ = let !e = toException (ErrorCall "test") in
+ raise# e
diff --git a/testsuite/tests/codeGen/should_run/T7319.stderr b/testsuite/tests/codeGen/should_run/T7319.stderr
new file mode 100644
index 0000000000..4d3bc94310
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/T7319.stderr
@@ -0,0 +1,5 @@
+*** Exception (reporting due to +RTS -xc): (base:GHC.Exception.SomeException), stack trace:
+ Main.foo,
+ called from Main.main,
+ called from Main.CAF
+T7319: test
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T
index cef39946ef..f2fbe431a9 100644
--- a/testsuite/tests/codeGen/should_run/all.T
+++ b/testsuite/tests/codeGen/should_run/all.T
@@ -94,3 +94,9 @@ test('setByteArray', normal, compile_and_run, [''])
test('6146', normal, compile_and_run, [''])
test('T5900', normal, compile_and_run, [''])
test('T7163', normal, compile_and_run, [''])
+
+# Gives different results when optimised, so restrict to just one way
+test('T7319', [ extra_ways(['prof']), only_ways(['prof']), exit_code(1),
+ req_profiling,
+ extra_hc_opts('-fprof-auto'),
+ extra_run_opts('+RTS -xc') ], compile_and_run, [''])