
#15186: ghc 8.4.2 panic in profiling build -------------------------------------+------------------------------------- Reporter: kquick | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Profiling | Version: 8.4.2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): The problem appears to be caused by the matcher for `PointerExpr`, which is levity polymorphic: {{{#!hs Bar.$mPointerExpr :: forall (r :: TYPE rep) (tp :: CrucibleType). Expr tp -> (GHC.Prim.Void# -> r) -> (GHC.Prim.Void# -> r) -> r }}} This particular form of levity polymorphism should be perfectly fine. However, it seems that the worker-wrapper pass somehow stumbles on to this: {{{ ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.4.1 for x86_64-unknown-linux): isUnliftedType r_a32N :: TYPE rep_a32M Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable pprPanic, called at compiler/types/Type.hs:1951:10 in ghc:Type CallStack (from -prof): WorkWrap.splitFun (compiler/stranal/WorkWrap.hs:(470,1)-(566,42)) WorkWrap.tryWW (compiler/stranal/WorkWrap.hs:(397,1)-(424,65)) WorkWrap.wwBind (compiler/stranal/WorkWrap.hs:(86,1)-(97,76)) WorkWrap.wwTopBinds (compiler/stranal/WorkWrap.hs:(63,1)-(66,30)) SimplCore.WorkWrap (compiler/simplCore/SimplCore.hs:491:40-59) HscMain.Core2Core (compiler/main/HscMain.hs:1212:7-55) HscMain.hscSimplify' (compiler/main/HscMain.hs:(1206,1)-(1212,55)) HscMain.finish (compiler/main/HscMain.hs:(728,1)-(768,70)) HscMain.hscIncrementalCompile (compiler/main/HscMain.hs:(671,1)-(717,52)) GhcMake.upsweep_mod.compile_it (compiler/main/GhcMake.hs:(1457,13)-(1459,66)) GhcMake.upsweep_mod (compiler/main/GhcMake.hs:(1403,1)-(1559,49)) GhcMake.upsweep.upsweep' (compiler/main/GhcMake.hs:(1272,3)-(1371,91)) GhcMake.upsweep (compiler/main/GhcMake.hs:(1254,1)-(1371,91)) GhcMake.load'.upsweep_fn (compiler/main/GhcMake.hs:(393,9)-(394,41)) GhcMake.load'.checkHowMuch (compiler/main/GhcMake.hs:(270,9)-(272,27)) GhcMake.load' (compiler/main/GhcMake.hs:(246,1)-(494,38)) GhcMake.load (compiler/main/GhcMake.hs:(238,1)-(240,44)) GHC.withCleanupSession (compiler/main/GHC.hs:(466,1)-(475,37)) GHC.runGhc (compiler/main/GHC.hs:(441,1)-(446,26)) GHC.defaultErrorHandler (compiler/main/GHC.hs:(381,1)-(413,7)) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15186#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler