[GHC] #10602: ghc panic: Template variable unbound in rewrite rule when compiling with -O2

GHC ghc-devs at haskell.org
Mon Jul 13 12:04:26 UTC 2015


#10602: ghc panic: Template variable unbound in rewrite rule when compiling with
-O2
-------------------------------------+-------------------------------------
        Reporter:  pacak             |                   Owner:  bgamari
            Type:  bug               |                  Status:  merge
        Priority:  highest           |               Milestone:  7.10.2
       Component:  Compiler          |                 Version:  7.10.2-rc2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |               Test Case:
      Blocked By:                    |  simplCore/should_compile/T10602
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * status:  infoneeded => merge
 * testcase:   => simplCore/should_compile/T10602


Comment:

 Fixed by
 {{{
 commit 7da7b0e48598af7df25e1129772b42cb31649c74
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Mon Jul 13 12:58:34 2015 +0100

     Make sure rule LHSs are simplified

     SpecConstr was generating a rule LHS with nested casts,
     which the simplifier then optimised away.  Result: unbound
     template variables.

     Easily fixed.  See Note [SpecConstr call patterns]


 >---------------------------------------------------------------

 7da7b0e48598af7df25e1129772b42cb31649c74
  compiler/specialise/SpecConstr.hs                  | 25 ++++++++++--
  testsuite/tests/simplCore/should_compile/T10602.hs | 46
 +++++++++-------------
  .../tests/simplCore/should_compile/T10602b.hs      | 20 ++++++++++
  testsuite/tests/simplCore/should_compile/all.T     |  2 +-
  4 files changed, 61 insertions(+), 32 deletions(-)

 diff --git a/compiler/specialise/SpecConstr.hs
 b/compiler/specialise/SpecConstr.hs
 }}}
 I forgot to mention the ticket in the commit message.

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


More information about the ghc-tickets mailing list