#5539: GHC panic -  Simplifier ticks exhausted
---------------------------------+------------------------------------------
  Reporter:  hvr                 |          Owner:  simonpj       
      Type:  bug                 |         Status:  new           
  Priority:  high                |      Milestone:  7.6.2         
 Component:  Compiler            |        Version:  7.3           
Resolution:                      |       Keywords:                
        Os:  Linux               |   Architecture:  x86_64 (amd64)
   Failure:  Compile-time crash  |     Difficulty:  Unknown       
  Testcase:                      |      Blockedby:                
  Blocking:                      |        Related:                
---------------------------------+------------------------------------------
Changes (by aruiz):

 * cc: aruiz@… (added)


Comment:

 Here is another small test case:

 {{{
 {-# LANGUAGE ForeignFunctionInterface #-}

 module Test(test) where

 import Foreign.C.Types
 import Foreign.Ptr
 import Foreign.Marshal

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

 foreign import ccall "c_fun" c_fun
     :: Ptr Double -> Ptr Double -> CInt
     -> Ptr Double -> Ptr Double -> CInt
     -> CInt
     -> Ptr (Ptr Double) -> Ptr (Ptr Double)
     -> Ptr (Ptr CInt) -> Ptr (CInt) -> Ptr (CInt)
     -> Ptr (CInt)
     -> Ptr (Ptr CInt)
     -> Ptr (Ptr CInt) -> Ptr (Ptr CInt)
     -> Ptr (Ptr CInt) -> Ptr (Ptr CInt)
     -> Ptr (Ptr Double) -> Ptr (Ptr Double)
     -> IO CInt

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

 test :: IO ()
 test = do
     ppxs <- malloc
     ppys <- malloc
     ppos <- malloc
     ppl  <- malloc
     pn   <- malloc
     pnp  <- malloc
     pins <- malloc

     ppInd0A <- malloc
     ppInd1A <- malloc
     ppInd0B <- malloc
     ppInd1B <- malloc
     ppAlphaA <- malloc
     ppAlphaB <- malloc

     cx <- newArray [1..10]
     cy <- newArray [1..10]
     sx <- newArray [1..10]
     sy <- newArray [1..10]

     _ok <- c_fun cx cy 10 sx sy 10 1
                  ppxs ppys ppl pn pnp pins
                  ppos
                  ppInd0A ppInd1A ppInd0B ppInd1B
                  ppAlphaA ppAlphaB

     return ()

 }}}

 {{{
 $ ghc -c bug.hs -O1
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.6.1 for i386-unknown-linux):
         Simplifier ticks exhausted
     When trying UnfoldingDone base:GHC.Storable.readDoubleOffPtr{v r1ch}
 [gid]
     To increase the limit, use -fsimpl-tick-factor=N (default 100)
     If you need to do this, let GHC HQ know, and what factor you needed
     To see detailed counts use -ddump-simpl-stats
     Total ticks: 15244
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to