[GHC] #13874: GHC panic related to hybrid-vectors

#13874: GHC panic related to hybrid-vectors
-------------------------------------+-------------------------------------
Reporter: ocramz | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: MacOS X
Architecture: | Type of failure: Compile-time
Unknown/Multiple | crash or panic
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
The following module makes GHC 8.0.1 panic when the `fromList` declaration
is uncommented:
{{{#!hs
import qualified Data.Vector.Hybrid as VH
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector as V
data SHVector a = SHV {-# UNPACK #-} !Int !(VH.Vector VU.Vector V.Vector
(Int, a)) deriving (Eq)
fromList :: Int -> [(Int, a)] -> SHVector a
fromList n ll = SHV n (VH.fromList ll)
}}}
Crash message follows:
{{{#!hs
ghc: panic! (the 'impossible' happened)
(GHC version 8.0.1 for x86_64-apple-darwin):
Template variable unbound in rewrite rule
Variable: sc_shyr
Rule "SC:$j0"
Rule bndrs: [sc_shyr, sc_shys, sc_shyt, sg_shyu, sc_shyq]
LHS args: [sc_shyq,
(MV
@ (Mutable Vector)
@ (Mutable Vector)
@ (PrimState (ST RealWorld))
@ (Int, a_aeG1)
@ Int
@ a_aeG1
@~ (<(Int, a_aeG1)>_N
:: ((Int, a_aeG1) :: *) ~# ((Int, a_aeG1) :: *))
sc_shys
sc_shyt)
`cast` (sg_shyu
:: (MVector
(Mutable Vector)
(Mutable Vector)
(PrimState (ST RealWorld))
(Int, a_aeG1) :: *)
~R#
(Mutable
(Vector Vector Vector)
(PrimState (ST RealWorld))
(Int, a_aeG1) :: *))]
Actual args: [sc_shyk,
wild_ahdD
`cast` (Sub
(Sym (D:R:MutableVector[0] <Vector>_N
<Vector>_N))

#13874: GHC panic related to hybrid-vectors -------------------------------------+------------------------------------- Reporter: ocramz | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ocramz): I just understood this might be related to https://ghc.haskell.org/trac/ghc/ticket/13410 ; can anyone confirm? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13874#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13874: GHC panic related to hybrid-vectors -------------------------------------+------------------------------------- Reporter: ocramz | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: duplicate | Keywords: Operating System: MacOS X | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #13410 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13410 Comment: I believe this is in fact a duplicate of #13410. FWIW, I can't reproduce this bug in GHC 8.2.1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13874#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC