[GHC] #4831: Infinite loop in SpecConstr

GHC cvs-ghc at haskell.org
Fri Dec 10 10:05:29 CET 2010


#4831: Infinite loop in SpecConstr
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:              
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:              
   Component:  Compiler          |      Version:  7.0.1       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------
 Ben reports that `SpecConstr` can loop:
 {{{
 {-# LANGUAGE PArr #-}
 {-# OPTIONS -fvectorise #-}

 module Loop where
 import Data.Array.Parallel.Prelude
 import Data.Array.Parallel.Prelude.Double
 import qualified Prelude

 loop :: [:Double:] -> [:Double:]
 loop xs
     | 0 == 0    = xs
     | otherwise     = ([::] !: 0) +:+ [::] +:+ ([::] !: 0)
 }}}
 Compile with
 {{{
 ~/devel/ghc/ghc-head-incoming/inplace/bin/ghc-stage2 -c -Odph -fdph-seq
 -package dph-seq -package dph-prim-seq -c Loop.hs
 }}}
 (You need to build the DPH libraries first, of course.)  This causes
 `SpecConstr` to loop for at least 5 mins on my machine. Removing the
 middle `[::]` in the last line gets it though SpecConstr, but the result
 size is 1501143 and it then runs out of memory in the simplifier.

 Building with `-dph-par` runs fine.

 This is probably also why the `dph-words` benchmark in the testsuite is
 failing due to using too much memory during compilation.

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



More information about the Glasgow-haskell-bugs mailing list