[GHC] #8467: Stack overflow when optimizing recursive newtype

#8467: Stack overflow when optimizing recursive newtype ------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- I have {{{ module Bug where newtype Void = Void Void data Decision a = Disproved (a -> Void) foo :: () -> Decision Int foo _ = Disproved (\_ -> undefined) }}} When I {{{
ghc -O Bug.hs }}}
I get {{{ [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) stack overflow: use +RTS -K<size> to increase it }}} The module compiles fine without `-O`. This was tested on 7.7.20131011. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8467 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8467: Stack overflow when optimizing recursive newtype
-------------------------------------+------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by Simon Peyton Jones

#8467: Stack overflow when optimizing recursive newtype -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | Status: Priority: normal | closed Component: Compiler | Milestone: Resolution: fixed | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: stranal/should_compile/T8467 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by simonpj): * status: new => closed * testcase: => stranal/should_compile/T8467 * resolution: => fixed Comment: Thank you for this nice small test case. Fixed. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8467#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8467: Stack overflow when optimizing recursive newtype
-------------------------------------------------+-------------------------
Reporter: goldfire | Owner:
Type: bug | Status:
Priority: normal | closed
Component: Compiler | Milestone:
Resolution: fixed | Version: 7.7
Operating System: Unknown/Multiple | Keywords:
Type of failure: None/Unknown | Architecture:
Test Case: stranal/should_compile/T8467 | Unknown/Multiple
Blocking: | Difficulty:
| Unknown
| Blocked By:
| Related Tickets:
-------------------------------------------------+-------------------------
Comment (by Simon Peyton Jones
participants (1)
-
GHC