summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/cgrun028.hs
blob: 3fa877cdb88896757e776dbf5effcdb2d6c66e89 (plain)
1
2
3
4
5
6
7
8
9
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