diff options
author | David Terei <davidterei@gmail.com> | 2011-07-20 11:09:03 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-07-20 11:26:35 -0700 |
commit | 16514f272fb42af6e9c7674a9bd6c9dce369231f (patch) | |
tree | e4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/codeGen/should_run/cgrun048.hs | |
parent | ebd422aed41048476aa61dd4c520d43becd78682 (diff) | |
download | haskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz |
Move tests from tests/ghc-regress/* to just tests/*
Diffstat (limited to 'testsuite/tests/codeGen/should_run/cgrun048.hs')
-rw-r--r-- | testsuite/tests/codeGen/should_run/cgrun048.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/cgrun048.hs b/testsuite/tests/codeGen/should_run/cgrun048.hs new file mode 100644 index 0000000000..30f0b3e387 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/cgrun048.hs @@ -0,0 +1,24 @@ + +-- The new register allocator in 4.08 had a bug wherein +-- flow edges away from an insn which does a jump through +-- a switch table were not being added to the flow graph, +-- which causes computation of live ranges and thus register +-- assignment to be wrong in the alternatives and default. +-- This was fixed properly in the head branch (pre 4.09) +-- and avoided in 4.08.1 by disabling jump table generation +-- in the NCG -- it generates trees of ifs instead. + +module Main ( main ) where + +main = print (map f [1 .. 7]) + + + +{-# NOINLINE f #-} +f :: Int -> Bool +f 7 = False +f 1 = False +f 4 = False +f 6 = False +f 5 = False +f x = if x * 10 == 20 then True else False |