
#10245: panic in new integer switch logic with "out-of-range" literals -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: nomeata 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: | -------------------------------------+------------------------------------- Comment (by nomeata): Interesting, as a test case it fails with {{{ ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.11.20150403 for x86_64-unknown-linux): ASSERT failed! file compiler/basicTypes/Literal.hs line 220 9223372036854775808 }}} due to {{{ mkMachInt :: DynFlags -> Integer -> Literal mkMachInt dflags x = ASSERT2( inIntRange dflags x, integer x ) MachInt x }}} This makes we wonder: Is that even legal Haskell, or should we fail much earlier? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10245#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler