[GHC] #10504: GHC panics with dsImpSpecs on SPECIALISE pragma with -fhpc enabled

GHC ghc-devs at haskell.org
Tue Jun 9 14:28:41 UTC 2015


#10504: GHC panics with dsImpSpecs on SPECIALISE pragma with -fhpc enabled
-------------------------------------+-------------------------------------
        Reporter:  nh2               |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by nh2):

 Ok, I found what makes the difference, `-O` is the culprit.

 With `-O`:

 {{{
 $ ghc --make -O -isrc B A -Wall -fhpc
 [2 of 2] Compiling B                ( src/B.hs, src/B.o )

 src/B.hs:5:1: Warning:
     SPECIALISE pragma for non-overloaded function ‘myfun’
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.8.4 for x86_64-unknown-linux):
         dsImpSpecs main:A.myfun{v r0} [gid]

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 Without `-O`:

 {{{
 $ ghc --make -isrc B A -Wall -fhpc
 [2 of 2] Compiling B                ( src/B.hs, src/B.o )
 }}}

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


More information about the ghc-tickets mailing list