[GHC] #3591: A working program reports <<loop>> when compiled with -O

GHC ghc-devs at haskell.org
Wed Jun 7 12:47:38 UTC 2017


#3591: A working program reports <<loop>> when compiled with -O
-------------------------------+-------------------------------------------
        Reporter:  blamario    |         Owner:  igloo
            Type:  merge       |        Status:  closed
        Priority:  normal      |     Milestone:  6.12.1
       Component:  Compiler    |       Version:  6.10.4
      Resolution:  fixed       |      Keywords:
Operating System:  Linux       |  Architecture:  x86_64 (amd64)
 Type of failure:              |     Test Case:  simplCore/should_run/T3591
  None/Unknown                 |
      Blocked By:              |      Blocking:
 Related Tickets:              |
-------------------------------+-------------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"2b74bd9d8b4c6b20f3e8d9ada12e7db645cc3c19/ghc"
 2b74bd9d/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="2b74bd9d8b4c6b20f3e8d9ada12e7db645cc3c19"
 Stop the specialiser generating loopy code

 This patch fixes a bad bug in the specialiser, which showed up as
 Trac #13429.  When specialising an imported DFun, the specialiser could
 generate a recusive loop where none existed in the original program.

 It's all rather tricky, and I've documented it at some length in
    Note [Avoiding loops]

 We'd encoutered exactly this before (Trac #3591) but I had failed
 to realise that the very same thing could happen for /imported/
 DFuns.

 I did quite a bit of refactoring.

 The compiler seems to get a tiny bit faster on
    deriving/perf/T10858
 but almost all the gain had occurred before now; this
 patch just pushed it over the line.
 }}}

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


More information about the ghc-tickets mailing list