[project @ 2000-08-22 14:16:06 by sewardj]
[ghc-hetmet.git] / ghc / tests / codeGen / should_run / cg048.hs
1
2 -- The new register allocator in 4.08 had a bug wherein
3 -- flow edges away from an insn which does a jump through
4 -- a switch table were not being added to the flow graph,
5 -- which causes computation of live ranges and thus register
6 -- assignment to be wrong in the alternatives and default.
7 -- This was fixed properly in the head branch (pre 4.09)
8 -- and avoided in 4.08.1 by disabling jump table generation
9 -- in the NCG -- it generates trees of ifs instead.
10
11 module Main ( main ) where
12
13 main = print (map f [1 .. 7])
14
15
16
17 {-# NOINLINE f #-}
18 f :: Int -> Bool
19 f 7 = False
20 f 1 = False
21 f 4 = False
22 f 6 = False
23 f 5 = False
24 f x = if x * 10 == 20 then True else False