[GHC] #14051: Unboxed sums-related panic: getUnboxedSumName 513

GHC ghc-devs at haskell.org
Sat Jul 29 03:03:45 UTC 2017


#14051: Unboxed sums-related panic: getUnboxedSumName 513
-------------------------------------+-------------------------------------
           Reporter:  RyanGlScott    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1-rc2
           Keywords:  UnboxedSums    |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Originally reported
 [https://www.reddit.com/r/haskell/comments/6q6yau/unboxed_sums_ghc_panic/
 here]. You'll need these two files:

 {{{#!hs
 -- Testing.hs
 {-# LANGUAGE UnboxedSums #-}

 module Testing where

 func :: s -> (# Bool | Bool #)
 func _ = (# True | #)
 }}}
 {{{#!hs
 -- Bug.hs
 {-# LANGUAGE UnboxedSums #-}

 module Main where

 import Testing

 main :: IO ()
 main = print $ func 1
 }}}

 And you must compile them like so (the `-c` and `-O2` flags are
 important):

 {{{
 $ ghc -O2 -c Testing.hs
 $ ghc -O2 -c Bug.hs
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.2.1 for x86_64-unknown-linux):
         getUnboxedSumName
   513
   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/prelude/KnownUniques.hs:104:5 in
 ghc:KnownUniques
 }}}

 Reproducible with GHC 8.2.1 and HEAD.

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


More information about the ghc-tickets mailing list