#5539: GHC panic -  Simplifier ticks exhausted
---------------------------------+------------------------------------------
  Reporter:  hvr                 |          Owner:  simonpj       
      Type:  bug                 |         Status:  new           
  Priority:  high                |      Milestone:  7.4.1         
 Component:  Compiler            |        Version:  7.3           
Resolution:                      |       Keywords:                
        Os:  Linux               |   Architecture:  x86_64 (amd64)
   Failure:  Compile-time crash  |     Difficulty:  Unknown       
  Testcase:                      |      Blockedby:                
  Blocking:                      |        Related:                
---------------------------------+------------------------------------------

Comment(by simonpj):

 Bryan: I tried to give the rule above:
   * If you give an INLINE pragma on a definition `f x = <expr>`, then GHC
 inlines precisely `<expr>` at every call site.
 So GHC simply treats INLINE very much like cpp treats a macro: it simply
 inlines the code on the RHS.  If you inline a big thing, many times,
 you'll get a big thing.  That seems reasonable to me.  As you say, any
 reasonable compiler will eliminate dead code, and GHC certainly does so,
 but the intermediate happens to be big in this case.

 Roman, it's hard for GHC to anticipate exactly what you want.  Better IMHO
 to provide simple rules, and give you the hooks to say what you want.  Why
 did I introduce it?  Because it provides an excellent indication that
 something is going wrong, as indeed it has here.  Maybe there should be a
 way to switch it off.  But you can just sent the factor to a large number
 instead.

 In this case a simple patch to `vector` suffices (I gave two versions).
 Would you like to apply it to `vector`?

 If you really want the bounds checks, you are going to pay with lots of
 tests. For that case, making the test out-of-line makes a lot of sense.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to