[GHC] #10245: panic in new integer switch logic with "out-of-range" literals

GHC ghc-devs at haskell.org
Sun Apr 5 21:02:06 UTC 2015


#10245: panic in new integer switch logic with "out-of-range" literals
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                   Owner:  nomeata
            Type:  bug               |                  Status:  closed
        Priority:  high              |               Milestone:
       Component:  Compiler          |                 Version:  7.11
  (CodeGen)                          |                Keywords:
      Resolution:  fixed             |            Architecture:  x86_64
Operating System:  Unknown/Multiple  |  (amd64)
 Type of failure:  Compile-time      |               Test Case:
  crash                              |                Blocking:
      Blocked By:                    |  Differential Revisions:
 Related Tickets:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 FWIW I encountered this in the wild (https://github.com/ghc/packages-
 time/blob/master/lib/Data/Time/LocalTime/TimeZone.hs#L88) while trying to
 cross-compile GHC to x86.

 I'm pretty sure it is valid Haskell; what if the type signature was `f ::
 Num a => a -> String`? Should specializing `a` to `Int` turn a valid
 program into an invalid one?

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


More information about the ghc-tickets mailing list