Ticket #3983 (closed bug: fixed)
-O2 makes exception disappear
| Reported by: | benjamin_scarlet | Owned by: | simonpj |
|---|---|---|---|
| Priority: | low | Milestone: | 7.0.1 |
| Component: | Compiler | Version: | 6.12.1 |
| Keywords: | exception optimization | Cc: | |
| Operating System: | Unknown/Multiple | Architecture: | x86_64 (amd64) |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | simplCore/should_run/T3983 | Blocked By: | #3959 |
| Blocking: | #4229, #4241 | Related Tickets: |
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

