id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
4924	bizarre strictness analysis bug	simonmar		"This module:

{{{
module Test where

f :: Int -> Int -> Int
f 0 t = t
f i t = f (i-1) (t+1)

g :: Int -> Int -> Int
g 0 t = t
g i t = g (i-1) (t+1)
}}}

contains two identical functions, `f` and `g`.  If we compile with `-O2 -dverbose-core2core` using HEAD, GHC derives different strictness for them:

{{{
Test.f [Occ=LoopBreaker]
  :: GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int
 ...
 Str=DmdType U(L)U(L)m,

Test.g [Occ=LoopBreaker]
  :: GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int
  ...
 Str=DmdType U(L)L,
}}}

The strictness on `g` is wrong (it should be strict in both arguments).

What is even more bizarre is that if you DELETE `f`, then `g` gets the correct strictness!
"	bug	closed	high	7.4.1	Compiler	7.1	fixed			Unknown/Multiple	Unknown/Multiple	None/Unknown					
