[GHC] #13233: typePrimRep panic while compiling GHC with profiling

GHC ghc-devs at haskell.org
Thu Mar 23 14:58:51 UTC 2017


#13233: typePrimRep panic while compiling GHC with profiling
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  bgamari
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 FWIW, here is a much easier way to trigger this panic that doesn't require
 profiling:

 {{{#!hs
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TypeInType #-}
 {-# LANGUAGE UnboxedTuples #-}
 module Bug where

 import GHC.Exts (TYPE)

 class Foo (a :: TYPE rep) where
   bar :: forall (b :: TYPE rep2). (a -> a -> b) -> a -> a -> b

 baz :: forall (a :: TYPE rep). Foo a => a -> a -> (# a, a #)
 baz = bar (#,#)
 }}}

 {{{
 $ ~/Software/ghc/inplace/bin/ghc-stage2 Bug.hs
 [1 of 1] Compiling Bug              ( Bug.hs, Bug.o )
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 8.3.20170322 for x86_64-unknown-linux):
         runtimeRepPrimRep
   typePrimRep (a_12 :: TYPE k0_10)
   k0_10
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1191:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1195:37 in
 ghc:Outputable
         pprPanic, called at compiler/simplStg/RepType.hs:360:5 in
 ghc:RepType
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13233#comment:24>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list