[GHC] #13209: ghc panic with optimization.

GHC ghc-devs at haskell.org
Mon Jan 30 12:57:47 UTC 2017


#13209: ghc panic with optimization.
-------------------------------------+-------------------------------------
        Reporter:  1chb              |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:  x86
 Type of failure:  GHC rejects       |            Test Case:
  valid program                      |
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by mpickering):

 You can tell the compiler to not inline `==` by saying `{-# NOINLINE (==)
 #-}`. This causes the program to compile quickly.

 Reid reopened this ticket as he says (on IRC) that he doesn't expect the
 simplifier to behave like this without an `INLINE` pragma. He said he
 would reply here shortly. You example is quite interesting as the type
 class allows the compiler to repeatably inline `==` but at different
 types each time. Normal recursive definitions, even with a fixed input,
 are not unrolled but with the "recursion" happening in this way it is
 easier to trick the compiler.

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


More information about the ghc-tickets mailing list