Skip to content

typePrimRep panic while compiling GHC with profiling

I am seeing this panic while compiling GHC stage2,

ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 8.1.20170124 for x86_64-unknown-linux):
	runtimeRepPrimRep
  typePrimRep (a :: TYPE k0)
  k0
  Call stack:
      ?callStack, called at compiler/utils/Util.hs:1352:50 in ghc:Util
        prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1166:58 in ghc:Outputable
        callStackDoc, called at compiler/utils/Outputable.hs:1170:37 in ghc:Outputable
        pprPanic, called at compiler/simplStg/RepType.hs:360:5 in ghc:RepType

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

<<ghc: 1038844096 bytes, 158 GCs, 21564561/73278928 avg/max bytes residency (8 samples), 148M in use, 0.000 INIT (0.000 elapsed), 1.113 MUT (1.125 elapsed), 0.935 GC (0.940 elapsed) :ghc>>
compiler/ghc.mk:582: recipe for target 'compiler/stage2/build/StgCmmMonad.p_o' failed

This appears to be due to my enabling of profiling. build.mk contains,

BuildFlavour=prof
ifneq "$(BuildFlavour)" ""
include mk/flavours/$(BuildFlavour).mk
endif
HADDOCK_DOCS=YES
compiler_HC_OPTS += -fprof-auto-exported
Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC goldfire
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information