[GHC] #12944: ghc master (8.1.20161206) panics with assertion failure with devel2 flavor and -O

GHC ghc-devs at haskell.org
Wed Dec 21 14:06:17 UTC 2016


#12944: ghc master (8.1.20161206) panics with assertion failure with devel2 flavor
and -O
-------------------------------------+-------------------------------------
        Reporter:  pacak             |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  highest           |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  8.1
  (CodeGen)                          |
      Resolution:  fixed             |             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):  Phab:D2844
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"1a4c04b13a695a530ee24835a7550a8c9ed2d37a/ghc" 1a4c04b/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="1a4c04b13a695a530ee24835a7550a8c9ed2d37a"
 Fix 'SPECIALISE instance'

 Trac #12944 showed that the DsBinds code that implemented a
 SPECIALISE pragma was inadequate if the constraints solving
 added let-bindings for dictionaries.  The result was that
 we ended up with an unbound dictionary in a DFunUnfolding -- and
 Lint didn't even check for that!

 Fixing this was not entirely straightforward

 * In DsBinds.dsSpec we use a new function
      TcEvidence.collectHsWrapBinders
   to pick off the lambda binders from the HsWapper

 * dsWrapper now returns a (CoreExpr -> CoreExpr) function

 * CoreUnfold.specUnfolding now takes a (CoreExpr -> CoreExpr)
   function it can use to specialise the unfolding.

 On the whole the code is simpler than before.
 }}}

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


More information about the ghc-tickets mailing list