Exceptions are optimized away in certain situations
The issue came up in [this thread on glasgow-haskell-users](http://www.haskell.org/pipermail/glasgow-haskell-users/2012-November/023027.html). ## Steps to reproduce: ```hs -- 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.
issue