summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/codeGen/should_run/T20275.hs6
-rw-r--r--testsuite/tests/codeGen/should_run/T20275.stdout2
-rw-r--r--testsuite/tests/codeGen/should_run/all.T3
3 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/T20275.hs b/testsuite/tests/codeGen/should_run/T20275.hs
new file mode 100644
index 0000000000..91e78144a7
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/T20275.hs
@@ -0,0 +1,6 @@
+import Numeric
+import GHC.Float
+
+main = do
+ putStrLn (showHex (castFloatToWord32 (abs (castWord32ToFloat 0xFFC00000))) "")
+ putStrLn (showHex (castDoubleToWord64 (abs (castWord64ToDouble 0xFFF8000000000000))) "")
diff --git a/testsuite/tests/codeGen/should_run/T20275.stdout b/testsuite/tests/codeGen/should_run/T20275.stdout
new file mode 100644
index 0000000000..9464944793
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/T20275.stdout
@@ -0,0 +1,2 @@
+7fc00000
+7ff8000000000000
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T
index 4ea31f9011..36772a7840 100644
--- a/testsuite/tests/codeGen/should_run/all.T
+++ b/testsuite/tests/codeGen/should_run/all.T
@@ -210,6 +210,9 @@ test('T16846', [only_ways(['optasm']), exit_code(1)], compile_and_run, [''])
test('T17920', cmm_src, compile_and_run, [''])
test('T18527', normal, compile_and_run, ['T18527FFI.c'])
test('T19149', only_ways('sanity'), compile_and_run, ['T19149_c.c'])
+test('T20275', [when(unregisterised(), skip),
+ unless(arch('i386') or arch('x86_64') or arch('powerpc') or arch('powerpc64') or arch('powerpc64le') or arch('aarch64'), skip)],
+ compile_and_run, [''])
test('CallConv', [when(unregisterised(), skip),
unless(arch('x86_64') or arch('aarch64'), skip),