[GHC] #3961: -O results in incorrect behavior on Mac OS X (was: HUnit has erroneous behavior when compiled with Cabal)

GHC cvs-ghc at haskell.org
Fri Apr 9 02:34:01 EDT 2010


#3961: -O results in incorrect behavior on Mac OS X
-------------------------+--------------------------------------------------
    Reporter:  RichardG  |       Owner:                             
        Type:  bug       |      Status:  new                        
    Priority:  normal    |   Component:  Compiler                   
     Version:  6.12.1    |    Keywords:                             
          Os:  MacOS X   |    Testcase:                             
Architecture:  x86       |     Failure:  Incorrect result at runtime
-------------------------+--------------------------------------------------
Changes (by RichardG):

 * cc: richardg@… (added)
  * failure:  None/Unknown => Incorrect result at runtime


Comment:

 Further experimentation has shown the behavior differs when the {{{-O}}}
 flag is used.  I.e.,

 {{{
 ghc --make -i.:tests -cpp -DBASE4 tests/HUnitTest98.lhs
 }}}

 has the correct behavior but

 {{{
 ghc --make -i.:tests -cpp -DBASE4 -O tests/HUnitTest98.lhs
 }}}

 does not.

 The severity of this issue is compounded by the fact that Cabal uses the
 {{{-O}}} flag by default.

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


More information about the Glasgow-haskell-bugs mailing list