
#11106: Turning on optimizer changes behavior in 7.10.3 -------------------------------------+------------------------------------- Reporter: dsf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata): Further simplification, removal of derived instances and spreading things out over multiple modules shows that `-O0` has to apply to these four lines only for the bug to occur: {{{ instance Eq ReportElemID where (==) a b = (==) (unReportElemID a) (unReportElemID b) instance Ord ReportElemID where compare a b = compare (unReportElemID a) (unReportElemID b) instance Enum ReportElemID where toEnum = (ReportElemID . toEnum) fromEnum = (fromEnum . unReportElemID) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11106#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler