[Haskell-cafe] ghc -O2 and HUnit weirdness

Roman Cheplyaka roma at ro-che.info
Fri Jan 7 00:42:24 CET 2011


* Jürgen Doser <jurgen.doser at gmail.com> [2011-01-07 00:18:09+0100]
> El jue, 06-01-2011 a las 16:41 -0400, Joey Hess escribió:
> > So, the problem seems to be that ghc -O2 somehow optimises the static
> > assertBool _ True away, in what seems to be a bad way. Remove the -O2 and
> > the test fails as expected. Presumably, although I have not verified,
> > less static boolean values would not trigger the optimisation.
> > Is this a ghc or HUnit bug? 
> > 
> > (Versions: 6.12.1, 1.2.2.1)
> 
> Looks like a GHC bug.

Works with -fno-state-hack.

-- 
Roman I. Cheplyaka :: http://ro-che.info/
Don't worry what people think, they don't do it very often.



More information about the Haskell-Cafe mailing list