summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/cgrun028.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/codeGen/should_run/cgrun028.hs')
-rw-r--r--testsuite/tests/codeGen/should_run/cgrun028.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/cgrun028.hs b/testsuite/tests/codeGen/should_run/cgrun028.hs
new file mode 100644
index 0000000000..3fa877cdb8
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/cgrun028.hs
@@ -0,0 +1,10 @@
+main = putStr (shows (f (read "42.0")) "\n")
+
+-- f compiled to bogus code with ghc 0.18 and earlier
+-- switch() on a DoubleReg
+
+f :: Double -> Int
+f 1.0 = 1
+f 2.0 = 2
+f 3.0 = 3
+f x = round x