#4283: Different behaviour with -O in concurrent program
---------------------------+------------------------------------------------
  Reporter:  simonpj       |          Owner:  simonmar        
      Type:  bug           |         Status:  closed          
  Priority:  normal        |      Milestone:  6.16.1          
 Component:  Compiler      |        Version:  6.12.3          
Resolution:  invalid       |       Keywords:                  
  Testcase:                |      Blockedby:                  
Difficulty:                |             Os:  Unknown/Multiple
  Blocking:                |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---------------------------+------------------------------------------------
Changes (by simonmar):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 The problem is here:

 {{{
      let rest' = assert ((fromIntegral $ C.length rest') <= capacity) $
 C.pack rest
 }}}

 `rest'` is `_|_`, which accounts for the `<<loop>>`, and the assert is
 only executed when optimisation is off, which accounts for the different
 behaviour when compiled with optimisation on.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4283#comment:3>
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