#3403: linear stack usage where constant stack usage expected
-------------------------------------------+--------------------------------
Reporter: igloo | Owner:
Type: bug | Status: closed
Priority: normal | Milestone: 6.14.1
Component: Compiler | Version: 6.10.4
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Testcase: simplCore/should_run/T3403 | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
-------------------------------------------+--------------------------------
Changes (by simonpj):
* testcase: => simplCore/should_run/T3403
* status: new => closed
* resolution: => fixed
Comment:
Thanks for a fine bug report. It turned out that the CPR optimisation was
interacting badly with the code generated by pattern matching. Happily,
easy to fix.
{{{
Tue Sep 8 14:14:00 BST 2009 [email protected]
* Fix Trac #3403: interaction of CPR and pattern-match failure
A fine bug report (#3403) demonstrated that we were losing the tail
call property when a complicated pattern match was involved. After
a bit of investigation I discovered that the culprit was the failure
join-point introduced by the pattern matcher. It was a zero-argument
thunk, which is not very CPR-friendly, and that interacted badly with
CPR worker/wrapper.
It's easy to fix, the same way that we fix other join points, by
supplying
a dummy argument (that is not really passed at runtime.
M ./compiler/deSugar/DsUtils.lhs -12 +25
}}}
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3403#comment:2>
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