Opened 10 years ago

Closed 9 years ago

Last modified 44 years ago

#258 closed bug (Fixed)

Parallel array comprehension related crash

Reported by: ekarttun Owned by: nobody
Priority: low Milestone:
Component: Compiler Version: None
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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@haskell.org,
or http://sourceforge.net/projects/ghc/.

Change History (4)

comment:1 Changed 10 years ago by ekarttun

Logged In: YES 
user_id=665422

The cvs version packaged with debian is quite old:

e@casca:~$ dpkg -s ghc-cvs | grep Version
Version: 20040725-2

I can try to compile a newer ghc if that would potentially help.

comment:2 Changed 9 years ago by ekarttun

Logged In: YES 
user_id=665422

With ghc-6.2.2 one gets:

ghc-6.2.2: panic! (the `impossible' happened, GHC version 6.2.2):
        Name.mkTupNameStr: 1 ???


And with the cvs-snapshot from 20041017 undefined references:

aa.o(.text+0x367): In function `s1TL_info':
: undefined reference to `DataziTuple_Z1T_con_info'
aa.o(.text+0x5e7): In function `s1TV_info':
: undefined reference to `DataziTuple_Z1T_con_info'
collect2: ld returned 1 exit status


comment:3 Changed 9 years ago by simonpj

Logged In: YES 
user_id=50165

Yes, this is a bug in the desugarer for PArrrays.

I've asked Manuel to look into it.

Simon

comment:4 Changed 9 years ago by chak

  • Status changed from assigned to closed
Logged In: YES 
user_id=10359

Fix should be in the 6.4 release.
Note: See TracTickets for help on using tickets.