[GHC] #10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: typecheck/should_compile/T2497 | Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- {{{ $ make TEST=T2497 WAY=optasm EXTRA_HC_OPTS=-fsimpl-tick-factor=10000 TEST_HC=ghc-7.11.20150711 ... T2497.hs:18:1: warning: Defined but not used: ‘beq’ ghc: panic! (the 'impossible' happened) (GHC version 7.11.20150711 for x86_64-unknown-linux): Simplifier ticks exhausted When trying RuleFired rule 1 To increase the limit, use -fsimpl-tick-factor=N (default 100) If you need to do this, let GHC HQ know, and what factor you needed To see detailed counts use -ddump-simpl-stats Total ticks: 40000 ... }}} The test is very small: {{{ module ShouldCompile() where eq :: Eq a => a -> a -> Bool eq = (==) {-# RULES "rule 1" forall x y. x == y = y `eq` x #-} }}} The problem does not occur with ghc-7.10.1. Curiously the problem goes away when I change the module header to `module ShouldCompile where`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10657 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.12.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_compile/T2497
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Thomas Miedema

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.10.2 Component: Compiler | Version: 7.10.2-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T2497 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * priority: high => highest * version: 7.11 => 7.10.2-rc2 * milestone: 7.12.1 => 7.10.2 Comment: Same problem with `ghc-7.10.1.20150715`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10657#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.12.1 Component: Compiler | Version: 7.10.2-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T2497 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 7.10.2 => 7.12.1 Comment: `T2497` passes with the current state of the `ghc-7.10` branch (likely due to the fix for #10527). Re-milestoning for 7.12.1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10657#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.10.2 Component: Compiler | Version: 7.10.2-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T2497 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 7.12.1 => 7.10.2 Comment: Never mind, I was testing with the wrong `WAY`. It appears to still fail on 7.10. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10657#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: closed Priority: highest | Milestone: 7.10.2 Component: Compiler | Version: 7.10.2-rc2 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T2497 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => invalid Comment: This is hardly suprising. Inlining `(==)` we get {{{ {-# RULES "rule 1" forall x y. x == y = y == x #-} }}} So rewriting using the rule yields a new opportunity for using the rule. What did you expect? Re-open if you disagree. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10657#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: closed Priority: highest | Milestone: 7.10.2 Component: Compiler | Version: 7.10.2-rc2 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T2497 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by bgamari): simonpj, well, the real question is "what is was the author of the testcase expecting?" It seems that the intention of this test is to verify that scoping in RULES works correctly, not exercise the simplifier (although it's a bit difficult reconstructing this from the cited tickets). In light of this, it seems like the right solution here is to fix the testcase. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10657#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T2497 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by bgamari): * status: closed => new * resolution: invalid => * milestone: 7.10.2 => 7.10.3 Comment: Simon is working on a new testcase. In the meantime we'll mark this as broken in 7.10.2. Reopening so we don't loose track of this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10657#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.12.1 Component: Compiler | Version: 7.10.2-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T2497 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 7.10.3 => 7.12.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10657#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10657: Regression T2497 WAY=optasm: Simplifier ticks exhausted
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: closed
Priority: highest | Milestone: 7.12.1
Component: Compiler | Version: 7.10.2-rc2
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_compile/T2497
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by simonpj):
* status: new => closed
* resolution: => fixed
Comment:
This
{{{
commit 55754ea34bd42ae88121311e9d0f29e90cce8166
Author: Simon Peyton Jones
participants (1)
-
GHC