mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 00:27:45 +02:00
* handle for-loops correctly if the limits contain the counter variable
git-svn-id: trunk@19918 -
This commit is contained in:
parent
2087ab1508
commit
5defdf86ba
@ -344,10 +344,14 @@ unit optdfa;
|
|||||||
{ update for node }
|
{ update for node }
|
||||||
{ life:=life+use+body }
|
{ life:=life+use+body }
|
||||||
l:=copy(node.optinfo^.life);
|
l:=copy(node.optinfo^.life);
|
||||||
DFASetIncludeSet(l,node.optinfo^.use);
|
|
||||||
DFASetIncludeSet(l,tfornode(node).t2.optinfo^.life);
|
DFASetIncludeSet(l,tfornode(node).t2.optinfo^.life);
|
||||||
{ the for loop always updates its control variable }
|
{ the for loop always updates its control variable }
|
||||||
DFASetDiff(l,l,node.optinfo^.def);
|
DFASetDiff(l,l,node.optinfo^.def);
|
||||||
|
|
||||||
|
{ ... but it could be that left/right use it, so do it after
|
||||||
|
removing def }
|
||||||
|
DFASetIncludeSet(l,node.optinfo^.use);
|
||||||
|
|
||||||
UpdateLifeInfo(node,l);
|
UpdateLifeInfo(node,l);
|
||||||
|
|
||||||
{ ... and a second iteration for fast convergence }
|
{ ... and a second iteration for fast convergence }
|
||||||
|
Loading…
Reference in New Issue
Block a user