Skip to content

[6.8.1 regression] 6.8.2 panics in nameModule with -O2

The attached file makes GHC 6.8.2 panic:

$ ghc-6.8.2 -fforce-recomp -O2 -c PPrCF.hs 
ghc-6.8.2: panic! (the 'impossible' happened)
  (GHC version 6.8.2 for i386-apple-darwin):
        nameModule $wprCFTree{v sdg}

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

It only happens with -O2:

$ ghc-6.8.2 -fforce-recomp -O1 -c PPrCF.hs 

And only with 6.8.2:

$ ghc-6.8.1 -fforce-recomp -O2 -c PPrCF.hs
$ ghc-6.6.1 -fforce-recomp -O2 -c PPrCF.hs

-dcore-lint gives no additional information.

Adding a NOINLINE pragma for prCFTree makes the panic go away.

This problem and the NOINLINE work-around was found by Jean-Philippe Bernardy in GF.

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information