#2722: <<loop> when compiling with -O option with ghc-6.10.0.20081019
-----------------------------------------+----------------------------------
  Reporter:  uwe                         |          Owner:  simonpj       
      Type:  bug                         |         Status:  infoneeded    
  Priority:  normal                      |      Milestone:  7.0.3         
 Component:  libraries (other)           |        Version:  7.0.1         
Resolution:                              |       Keywords:  arrows        
  Testcase:  tyepcheck/should_run/T2722  |      Blockedby:                
Difficulty:  Unknown                     |             Os:  Linux         
  Blocking:                              |   Architecture:  x86_64 (amd64)
   Failure:  Runtime crash               |  
-----------------------------------------+----------------------------------

Comment(by simonpj):

 Harumph.  It turns out that `-fno-enable-rewrite-rules` doesn't work.
 This patch fixes it
 {{{
 * Make -fno-enable-rewrite-rules work properly

   I'd failed to propagate the Opt_EnableRewriteRules flag properly,
   which meant that -fno-enable-rewrite-rules didn't disable all
   rewrites.  This patch fixes it.

     M ./compiler/simplCore/CoreMonad.lhs -4 +1
     M ./compiler/simplCore/SimplCore.lhs -1 +1
     M ./compiler/simplCore/SimplUtils.lhs -7 +13
     M ./compiler/simplCore/Simplify.lhs -1 +2
 }}}
 Once that is done, T2722 works fine with `-O -fno-enable-rewrite-rules`,
 and loops with plain `-O`.  (You don't need to recompile the libraries to
 see this effect.)

 So it's definitely a rewrite rule.  It seems to me very likely that it's a
 similar bug to the one I tracked down at the beginning of this ticket.
 It's probably not strictly a GHC bug, but still a bug in a RULE in a
 library shipped with GHC is much the same from a customer point of view.

 To help find it,
  * `-ddump-rule-firings` will show which rules are firing
  * `-ddump-rule-rewrites` will additionally show before and after
  * You can comment out rules to disable them individually.  (But some are
 in libraries, so that will require you to recompile the library.)

 Thanks for helping

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2722#comment:20>
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