Merge branch 'master' into atomics
[ghc.git] / testsuite / tests / simplCore / should_compile / T4957.hs
1 {-# LANGUAGE MagicHash #-}
2 module T4957 where
3
4 import GHC.Base
5
6 f :: Bool -> Int -> Int
7 f b 0 = 0
8 f b x = let y = case b of
9 True -> case f b (x-1) of
10 I# v -> I# (v -# 1#)
11 False -> case f b (x-1) of
12 I# v -> I# (v +# 1#)
13 in
14 case b of
15 True -> case y of
16 I# w -> I# (w -# 1#)
17
18 False -> case y of
19 I# w -> I# (w +# 1#)