summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen
diff options
context:
space:
mode:
authorJan Stolarek <jan.stolarek@p.lodz.pl>2013-08-14 16:34:06 +0100
committerJan Stolarek <jan.stolarek@p.lodz.pl>2013-08-14 16:59:25 +0100
commitbbb9cbef38a2072cbaf7a0c098f5f924fc3fa89a (patch)
tree862c6a01a8a9b17b73fbb05193465a5e44f65961 /testsuite/tests/codeGen
parent0c03faed43cd010bcbe20f01a95182a93e4f35df (diff)
downloadhaskell-bbb9cbef38a2072cbaf7a0c098f5f924fc3fa89a.tar.gz
Add regression test for #8103
Diffstat (limited to 'testsuite/tests/codeGen')
-rw-r--r--testsuite/tests/codeGen/should_run/T8103.hs8
-rw-r--r--testsuite/tests/codeGen/should_run/T8103.stdout1
-rw-r--r--testsuite/tests/codeGen/should_run/T8103_A.hs7
-rw-r--r--testsuite/tests/codeGen/should_run/all.T2
4 files changed, 17 insertions, 1 deletions
diff --git a/testsuite/tests/codeGen/should_run/T8103.hs b/testsuite/tests/codeGen/should_run/T8103.hs
new file mode 100644
index 0000000000..99e213b06c
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/T8103.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE MagicHash #-}
+module Main where
+import T8103_A
+
+float_text = case (0.0## `foo` 1.2##) of
+ 0.0## -> "1"
+ _ -> "0"
+main = putStrLn (float_text)
diff --git a/testsuite/tests/codeGen/should_run/T8103.stdout b/testsuite/tests/codeGen/should_run/T8103.stdout
new file mode 100644
index 0000000000..573541ac97
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/T8103.stdout
@@ -0,0 +1 @@
+0
diff --git a/testsuite/tests/codeGen/should_run/T8103_A.hs b/testsuite/tests/codeGen/should_run/T8103_A.hs
new file mode 100644
index 0000000000..0e450d4f8a
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/T8103_A.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE MagicHash #-}
+module T8103_A where
+import GHC.Exts
+
+{-# NOINLINE foo #-}
+foo :: Double# -> Double# -> Double#
+foo a b = (a +## b)
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T
index e18bfa6d2a..88095f08b4 100644
--- a/testsuite/tests/codeGen/should_run/all.T
+++ b/testsuite/tests/codeGen/should_run/all.T
@@ -112,4 +112,4 @@ test('Word2Float64', unless(wordsize(64), skip), compile_and_run, [''])
test('T7361', normal, compile_and_run, [''])
test('T7600', normal, compile_and_run, [''])
-
+test('T8103', only_ways(['normal']), compile_and_run, [''])