#5550: GHC infinite loop when compiling vector
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.2.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Changes (by simonpj):
* cc: rl (added)
Comment:
Roman,
!ForceSpecConstr is behaving exactly as advertised. Here are the
comments:
{{{
ForceSpecConstr arguments are spotted in scExpr' and scTopBinds which then
set
sc_force to True when calling specLoop. This flag does three things:
* Ignore specConstrThreshold, to specialise functions of arbitrary size
(see scTopBind)
* Ignore specConstrCount, to make arbitrary numbers of specialisations
(see specialise)
* Specialise even for arguments that are not scrutinised in the loop
(see argToPat; Trac #4448)
}}}
So we generate a specialisation for `loop SPEC (x:z) xs`. And that
specialisation generates another, for `loop SPEC (x':x:z) xs'`. And so
on. The new specialisations are generated even though no one ever
scrutinises the agumrnt (condition (3)), and iwthout limit (condition
(2)).
So maybe the specification of !ForceSpecConstr is wrong. What would you
prefer?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5550#comment:7>
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