
#10372: panic! compiling Y combinator with optimizations -------------------------------------+------------------------------------- Reporter: cdk | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Keywords: panic, | Operating System: Unknown/Multiple simplifier | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- The following causes GHC 7.6.3, 7.8.3 and 7.10.1 (at least) to panic when compiling with optimizations: {{{#!hs module Y (y) where newtype Rec a = Rec { out :: Rec a -> a} k x = out x x y f = (f . k) (Rec (f . k)) }}} {{{ /tmp ««« ghc -O y.hs -fforce-recomp [1 of 1] Compiling Y ( y.hs, y.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.10.1 for x86_64-unknown-linux): Simplifier ticks exhausted When trying UnfoldingDone a_sof To increase the limit, use -fsimpl-tick-factor=N (default 100) If you need to do this, let GHC HQ know, and what factor you needed To see detailed counts use -ddump-simpl-stats Total ticks: 5282 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10372 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler