#5915: Code using seq has wrong strictness when unoptimised (too strict)
-----------------------------------------+----------------------------------
 Reporter:  michal.palka                 |          Owner:                      
      
     Type:  bug                          |         Status:  new                 
      
 Priority:  normal                       |      Component:  Compiler            
      
  Version:  7.3                          |       Keywords:  seq strictness 
strict lazy
       Os:  Unknown/Multiple             |   Architecture:  Unknown/Multiple    
      
  Failure:  Incorrect result at runtime  |       Testcase:                      
      
Blockedby:                               |       Blocking:                      
      
  Related:                               |  
-----------------------------------------+----------------------------------
 The following piece of code gets miscompiled if no optimisation is used.
 The program crashes instead of printing `[0]`, which would be the correct
 behaviour. GHC 7.3.20111127 has been used for triggering this bug.

 {{{
 test = seq (seq id (\a -> undefined a))

 main = do
   print $ test [0]
 }}}

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