#4241: Optimization causes HUnit to behave incorrectly
---------------------------+------------------------------------------------
    Reporter:  beej175560  |       Owner:                             
        Type:  bug         |      Status:  new                        
    Priority:  normal      |   Component:  Compiler                   
     Version:  6.12.1      |    Keywords:                             
    Testcase:              |   Blockedby:                             
          Os:  MacOS X     |    Blocking:                             
Architecture:  x86         |     Failure:  Incorrect result at runtime
---------------------------+------------------------------------------------
 When I build the following program with "ghc -O2 --make ...", the unit
 test passes.  I expect the test to fail because 1 does not equal 2.
 Compiling without optimization results in correct behavior.

 I'm not sure if this is a compiler bug but I'm filing it as such because
 of the dependence on optimization.  I'm running ghc on Mac OS 10.6.3
 installed from the downloaded file haskell-platform-2010.1.0.1-i386.dmg.
 The ghc version is 6.12.1.

 import Test.HUnit

 tests = test [ test [1 ~?= 2] ]

 main = runTestTT tests

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