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

GHC ghc-devs at haskell.org
Mon Apr 6 07:03:26 UTC 2015


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

 * owner:  nomeata =>
 * status:  closed => new
 * resolution:  fixed =>


Comment:

 Ok, I think I broke something else since 7.8. If I add
 {{{
 main = do
     let string = "0x8000000000000000"
     let i = read string :: Integer
     let i' = fromIntegral i :: Int
     print i
     print i'
     print (f i')
 }}}
 to your example, 7.8.4 produces
 {{{
 9223372036854775808
 -9223372036854775808
 "yes"
 }}}
 while HEAD produces
 {{{
 9223372036854775808
 -9223372036854775808
 "no"
 }}}

 I’ll investigate.

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


More information about the ghc-tickets mailing list