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

GHC ghc-devs at haskell.org
Fri Mar 24 02:52:21 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 bgamari):

 Regarding comment:24,

 Interesting. This is certainly the same panic, but the cause here is much
 different. Previously we were falling victim to ticks getting put between
 an unboxed tuple type constructor and its applied `RuntimeRep`s. In
 contrast, here we are seeing a call to `runtimeRepPrimRep` while
 generating code for,
 {{{#!hs
 Bug.baz
   :: forall a_a2DY.
      Bug.Foo a_a2DY =>
      a_a2DY -> a_a2DY -> (# a_a2DY, a_a2DY #)
 [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType, Unf=OtherCon []]
 Bug.baz =
   \ (@ (rep_a2F2 :: GHC.Types.RuntimeRep))
     (@ (a_a2F3 :: TYPE rep_a2F2))
     ($dFoo_s2P9 [Occ=Once] :: Bug.Foo a_a2F3) ->
     let {
       sat_s2Pa [Occ=Once] :: a_a2F3 -> a_a2F3 -> (# a_a2F3, a_a2F3 #)
       [LclId, Str=DmdType]
       sat_s2Pa =
         \ (eta_B2 [Occ=Once] :: a_a2F3) (eta_B1 [Occ=Once] :: a_a2F3) ->
           (# eta_B2, eta_B1 #) } in
     ($dFoo_s2P9
      `cast` (Bug.N:Foo[0] <rep_a2F2>_N <a_a2F3>_N
              :: (Bug.Foo a_a2F3 :: GHC.Types.Constraint)
                 ~R#
                 ((forall b_a2DW[sk].
                   (a_a2F3 -> a_a2F3 -> b_a2DW[sk])
                   -> a_a2F3 -> a_a2F3 -> b_a2DW[sk]) :: *)))
       @ 'GHC.Types.UnboxedTupleRep @ (# a_a2F3, a_a2F3 #) sat_s2Pa
 }}}

 I suspect the issue here is the cast,

 Great testsuite material, Ryan!

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


More information about the ghc-tickets mailing list