
#13171: panic on negative literal in case on Word -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs module Case where f :: Word -> Word f n = case n of -1 -> 2 _ -> 3 }}} {{{ ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.1.20170119 for x86_64-unknown-linux): ASSERT failed! -1 Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1182:22 in ghc:Outputable assertPprPanic, called at compiler/basicTypes/Literal.hs:223:75 in ghc:Literal Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable pprPanic, called at compiler/utils/Outputable.hs:1180:5 in ghc:Outputable assertPprPanic, called at compiler/basicTypes/Literal.hs:223:75 in ghc:Literal Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} Doesn't happen in 8.0.1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13171 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler