[GHC] #11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks exhausted" (optasm)

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks
exhausted" (optasm)
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.11
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{
$ ghc-head --info | grep Project
[("Project name","The Glorious Glasgow Haskell Compilation System")
,("Project version","8.1.20151231")
,("Project Git commit id","8afeaad919dc67643b4eff14efafb48b59039b2b")
}}}
{{{
$ make slowtest TEST=dynamic-paper VERBOSE=2 TEST_HC=ghc-head
...
=====> dynamic-paper(normal) 1 of 1 [0, 0, 0]
=====> dynamic-paper(hpc) 1 of 1 [0, 0, 0]
...
Compile failed (status 256) errors were:
*** Core Lint errors : in result of Float out(FOS {Lam = Just 0,
Consts = True,
OverSatApps = True})
***
<no location info>: warning:
In a case alternative: (TypeRepX k_s7Ec :: *,
a_s7Ed :: k_a5px,
tr2_s7Ee :: TypeRep a_s7Ed)
@ k_a5px is out of scope
*** Offending Program ***
...
<no location info>: error:
Compilation had errors
*** unexpected failure for dynamic-paper(hpc)
=====> dynamic-paper(optasm) 1 of 1 [0, 1, 0]
Compile failed (status 256) errors were:
ghc: panic! (the 'impossible' happened)
(GHC version 8.1.20151231 for x86_64-unknown-linux):
Simplifier ticks exhausted
When trying UnfoldingDone delta1
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: 203160
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
*** unexpected failure for dynamic-paper(optasm)
Unexpected results from:
TEST="dynamic-paper"
}}}
This test was added in commit 52da6bdc17bb491d6d2f462b3680eb44b9be92e5:
{{{
Author: Richard Eisenberg

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks exhausted" (optasm) -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/dynamic- | paper Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * priority: normal => high * testcase: => dependent/should_compile/dynamic-paper Comment: Core lint errors are bad, raising priority. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11330#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks exhausted" (optasm) -------------------------------------+------------------------------------- Reporter: thomie | Owner: simonpj Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/dynamic- | paper Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * owner: => simonpj Comment: Right. The "simplifier ticks exhausted" error is expected; see Section 7 of [http://research.microsoft.com/en-us/um/people/simonpj/papers/haskell- dynamic/ the paper]. But the Lint error is an outright bug. I'm on it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11330#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks
exhausted" (optasm)
-------------------------------------+-------------------------------------
Reporter: thomie | Owner: simonpj
Type: bug | Status: new
Priority: high | Milestone: 8.0.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| dependent/should_compile/dynamic-
| paper
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks
exhausted" (optasm)
-------------------------------------+-------------------------------------
Reporter: thomie | Owner: simonpj
Type: bug | Status: new
Priority: high | Milestone: 8.0.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| dependent/should_compile/dynamic-
| paper
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks exhausted" (optasm) -------------------------------------+------------------------------------- Reporter: thomie | Owner: simonpj Type: bug | Status: merge Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/dynamic- | paper Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => merge Comment: Seems like this is something we probably want in 8.0. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11330#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks exhausted" (optasm) -------------------------------------+------------------------------------- Reporter: thomie | Owner: simonpj Type: bug | Status: merge Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/dynamic- | paper Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Yes, do merge. The only test case I know of is `dynamic-paper` in way `hpc`. I might be able to cook up a simpler test case, but I'm out of time and the fix really has fixed it. So I'll leave it without adding a better regression test. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11330#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks exhausted" (optasm) -------------------------------------+------------------------------------- Reporter: thomie | Owner: simonpj Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/dynamic- | paper Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged as c4e94cd3f1742cc5e2b8391d151fef2fc9f8fdbe and f47feda9c1a5298fbcf40a5aba87750d19e14157. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11330#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks
exhausted" (optasm)
-------------------------------------+-------------------------------------
Reporter: thomie | Owner: simonpj
Type: bug | Status: closed
Priority: high | Milestone: 8.0.1
Component: Compiler | Version: 7.11
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| dependent/should_compile/dynamic-
| paper
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Thomas Miedema

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks exhausted" (optasm) -------------------------------------+------------------------------------- Reporter: thomie | Owner: simonpj Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/dynamic- | paper Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Just to be clear, the `expect_fail` is because of the issue in comment:2. The code says {{{ delta1 :: Dynamic -> Dynamic -- NB: this function behaves like a negative-recursive data type -- and hence leads compiler into an infinite inlining loop, -- and we get "simplifier ticks exhausted". -- See Section 7 of the paper "A reflection on types" delta1 dn = case fromDynamic dn of Just f -> f dn Nothing -> dn loop1 = delta1 (toDynamic delta1) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11330#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11330: Test `dynamic-paper` fails with core lint error (hpc) and "Simplifier ticks exhausted" (optasm) -------------------------------------+------------------------------------- Reporter: thomie | Owner: simonpj Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/dynamic- | paper Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by alpmestan): I tried a `./validate --slow` with the `master` branch from today and this `dynamic-paper` test shows up as an "unexpected pass" for optasm and optllvm. I suppose one of the commits referenced here or even some other ones somehow make GHC use less ticks on that example? Should we now expect this test to pass? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11330#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC