id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
4045	Ghc panics 'ASSERT failed! file compiler/typecheck/TcTyFuns.lhs line 318' when compiling my ghc tree.	milan		"In the middle of the work on GHC backend I triggered a bug in GHC. After discussing with simonpj, I have snapshotted the source tree, as I could not reduce the test case.

When compiled the stage 1 compiler with -DDEBUG, ghc-stage1 compiler panics when compiling stage 2. It is enough to invoke 'make' in the tree to get following compilation error:
{{{
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 6.13 for x86_64-unknown-linux):
        ASSERT failed! file compiler/typecheck/TcTyFuns.lhs line 318
[Wanted t_a1KB{tv} [tau] :: hoopl-3.8.0.0:Compiler.Hoopl.Dataflow.Fact{tc raN}
                              x{tv a1Ks} [sk] ghc-6.13:CmmSpillReload.DualLive{tc r11W}
                              ~
                            hoopl-3.8.0.0:Compiler.Hoopl.Dataflow.Fact{tc raN}
                              x{tv a1Ks} [sk] f{tv a1Kt} [tau]]
}}}

The file causing the bug is compiler/cmm/CmmSpillReload.hs. On line 271, there is a description of a change that makes the source compile.

This is different to #4044:
 * #4044 is a bug in 6.12.2
 * #4045 is a bug in the HEAD, when compiling code that 6.12.2 managed to compile.
Milan managed to find a way to change the source code to avoid both bugs.
"	bug	closed	normal	7.0.1	Compiler	6.13	worksforme		simonpj@…	Linux	x86_64 (amd64)	Compile-time crash					
