[GHC] #13171: panic on negative literal in case on Word

#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

#13171: panic on negative literal in case on Word -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * version: 8.1 => 8.0.1 Comment: I compiled GHC 8.0.1 with the `devel2` flavor and it still gave the same panic: {{{ $ ghc4/inplace/bin/ghc-stage2 --interactive Bug.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Case ( Bug.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): ASSERT failed! CallStack (from HasCallStack): assertPprPanic, called at compiler/basicTypes/Literal.hs:224:75 in ghc:Literal -1 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13171#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13171: panic on negative literal in case on Word -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Reid this looks like an area you are familiar with. Are you planning to look into it? Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13171#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13171: panic on negative literal in case on Word -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): In fact I had forgotten that I did use to know something about this. Phab:D810 would fix this issue also. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13171#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13171: panic on negative literal in case on Word
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#13171: panic on negative literal in case on Word -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13171#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC