#3983: -O2 makes exception disappear
---------------------------------+------------------------------------------
Reporter: benjamin_scarlet | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.1 | Keywords: exception optimization
Os: Unknown/Multiple | Testcase:
Architecture: x86_64 (amd64) | Failure: None/Unknown
---------------------------------+------------------------------------------
In this example, an exception throw/catch seems not to happen when
optimization is turned on. The behavior seems to be quite finicky.
Collapsing the code into fewer than the three given modules seems either
to make the bug go away or to produce a "internal error: PAP object
entered!" message. Other seemingly innocuous changes produce similar
results.
On both Linux and MacOS, this program produces "False" with no
optimization flags to ghc, or "True" with -O2.
On 6.10.4 on Linux, it produces "False" with or without -O2.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3983>
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