id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
5352	Very slow (nonterminating?) compilation if libraries compiled with -fexpose-all-unfoldings	batterseapower	simonpj	"I built the libraries with -fexpose-all-unfoldings. The stage 1 compiler then failed to terminate within ~20 minutes on InstalledPackageInfo.hs and PackageDescription.hs. The memory usage of the compiler did not grow appreciably (at all?) during this time, which makes me suspect that the problem is a loop rather than the extra unfoldings leading to code bloat (somehow).

An example of an offending invocation is:

{{{
""inplace/bin/ghc-stage1""   -H64m -O -fasm    -package-name Cabal-1.11.2 -hide-all-packages -i -ilibraries/Cabal/cabal/. -ilibraries/Cabal/cabal/dist-install/build -ilibraries/Cabal/cabal/dist-install/build/autogen -Ilibraries/Cabal/cabal/dist-install/build -Ilibraries/Cabal/cabal/dist-install/build/autogen -Ilibraries/Cabal/cabal/.    -optP-include -optPlibraries/Cabal/cabal/dist-install/build/autogen/cabal_macros.h -package array-0.3.0.3 -package base-4.4.0.0 -package containers-0.4.1.0 -package directory-1.1.0.1 -package filepath-1.2.0.1 -package old-time-1.0.0.7 -package pretty-1.1.0.0 -package process-1.1.0.0 -package unix-2.5.0.0  -fwarn-tabs -Wall -fno-ignore-asserts -XHaskell98 -XCPP -O -dcore-lint -fexpose-all-unfoldings -no-user-package-conf -rtsopts     -odir libraries/Cabal/cabal/dist-install/build -hidir libraries/Cabal/cabal/dist-install/build -stubdir libraries/Cabal/cabal/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c libraries/Cabal/cabal/./Distribution/InstalledPackageInfo.hs -o libraries/Cabal/cabal/dist-install/build/Distribution/InstalledPackageInfo.o
}}}

The workaround is to build these two files with -O0."	bug	closed	normal		Compiler	7.0.3	fixed			Unknown/Multiple	Unknown/Multiple	Compile-time performance bug					
