#7411: Exceptions are optimized away in certain situations ----------------------------------------+----------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.1 | Keywords: seq, deepseq, evaluate, exceptions Os: Linux | Architecture: x86_64 (amd64) Failure: Incorrect result at runtime | Blockedby: Blocking: | Related: ----------------------------------------+----------------------------------- The issue came up in [http://www.haskell.org/pipermail/glasgow-haskell- users/2012-November/023027.html this thread on glasgow-haskell-users].
== Steps to reproduce: == {{{ -- file Foo.hs import Control.Exception import Control.DeepSeq main = evaluate (('a' : undefined) `deepseq` return () :: IO ()) }}} {{{ $ ghc -fforce-recomp -fpedantic-bottoms -O Foo.hs }}} === Expected result: === The program should fail with: {{{ Foo: Prelude.undefined }}} === Actual result: === The program succeeds. Compiling the program with {{{-fno-state-hack}}} helps. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7411> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs