mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 11:30:25 +02:00
* set successor of blocknodes properly
git-svn-id: trunk@25970 -
This commit is contained in:
parent
b3c2a8ddb1
commit
1f05011113
@ -186,15 +186,18 @@ unit optutils;
|
||||
begin
|
||||
result:=p;
|
||||
DoSet(tblocknode(p).statements,succ);
|
||||
p.successor:=succ;
|
||||
if assigned(tblocknode(p).statements) then
|
||||
p.successor:=tblocknode(p).statements
|
||||
else
|
||||
p.successor:=succ;
|
||||
end;
|
||||
forn:
|
||||
begin
|
||||
Breakstack.Add(succ);
|
||||
Continuestack.Add(p);
|
||||
result:=p;
|
||||
{ the successor of the last node of the for body is the for node itself }
|
||||
DoSet(tfornode(p).t2,p);
|
||||
{ the successor of the last node of the for body is the body itself }
|
||||
DoSet(tfornode(p).t2,tfornode(p).t2);
|
||||
p.successor:=succ;
|
||||
Breakstack.Delete(Breakstack.Count-1);
|
||||
Continuestack.Delete(Continuestack.Count-1);
|
||||
|
Loading…
Reference in New Issue
Block a user