summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-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, [''])