[ ghc-Bugs-1035575 ] Parallel array comprehension related crash

SourceForge.net noreply at sourceforge.net
Mon Sep 27 12:33:29 EDT 2004


Bugs item #1035575, was opened at 2004-09-27 19:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1035575&group_id=8032

Category: Compiler
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Einar Karttunen (ekarttun)
Assigned to: Nobody/Anonymous (nobody)
Summary: Parallel array comprehension related crash

Initial Comment:
The following code panics with both 6.2 and the Debian
ghc-cvs snapshot. The problem appears to be in
the comprehension.

{-# OPTIONS -fparr -fglasgow-exts #-}
module Main (main) where

import GHC.PArr

ary = let arr1 = toP [1..10]
	  arr2 = toP [1..10]
	  f = [: i1 + i2 | i1 <- arr1 | i2 <- arr2 :]
	  in f !: 1

main = print ary

and the error (from the cvs snapshot):

ghc-6.3: panic! (the `impossible' happened, GHC version
6.3):
        applyTypeToArgs
    GHCziPArr.mapP{v} {- 01l -}
      @ (GHCziBase.Z0T{tc} {- (w) 40 -},
GHCziNum.Integer{tc} {- 314 -})
      (\ (ds{v}_d1On T :: (GHCziBase.Z0T{tc} {- (w) 40 -},
                           GHCziNum.Integer{tc} {- 314
-})) ->
         case ds{v}_d1On
         of wild{v}_B1 T { (ds{v}_d1Ot T, i2{v} {- v
aAO -} T) ->
         case ds{v}_d1Ot of wild{v}_B1 T { () ->
         let {
           ds{v}_d1OB T :: GHCziBase.Z0T{tc} {- (w) 40 -}
           ds{v}_d1OB = __letrec { } in 
GHCziBase.Z0T{v} {- (w) 71 -}
         } in  (ds{v}_d1On, ds{v}_d1OB)
         }
         })
      (GHCziPArr.crossP{v} {- 01o -}
         @ GHCziBase.Z0T{tc} {- (w) 40 -}
         @ GHCziNum.Integer{tc} {- 314 -}
         (GHCziPArr.replicateP{v} {- 01k -}
            @ GHCziBase.Z0T{tc} {- (w) 40 -}
            (GHCziBase.Izh{v} {- (w) 6d -} 1)
            GHCziBase.Z0T{v} {- (w) 71 -})
         (GHCziPArr.filterP{v} {- 01m -}
            @ GHCziNum.Integer{tc} {- 314 -}
            (\ (ds{v}_d1Oj T :: GHCziNum.Integer{tc} {-
314 -}) ->
               let {
                 i2{v} {- v aAO -} T ::
GHCziNum.Integer{tc} {- 314 -}
                 i2{v} {- v aAO -} = ds{v}_d1Oj
               } in  GHCziBase.True{v} {- (w) 6v -})
            arr2{v} {- v aAA -}))

Please report it as a compiler bug to
glasgow-haskell-bugs at haskell.org,
or http://sourceforge.net/projects/ghc/.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1035575&group_id=8032



More information about the Glasgow-haskell-bugs mailing list