[GHC] #10245: panic in new integer switch logic with "out-of-range" literals
GHC
ghc-devs at haskell.org
Mon Apr 6 06:56:42 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 nomeata):
> I'm pretty sure it is valid Haskell;
for some reason I was assuming you were writing unboxed literals. With
regular literals, you are right of course!
But I think we are implementing it wrongly. According to the report, your
code should be treated like
{{{
f n = if n == fromIntegral 0x8000000000000000 then "yes" else "no"
}}}
but my impression is that we produce a literal 0x8000000000000000 :: Int#
internally, which is then dropped from the case. I’ll check.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10245#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list