mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 05:10:34 +01:00
* In genhightree, do typecheckpass later to prevent references to possibly
optimizes away nodes. git-svn-id: trunk@6994 -
This commit is contained in:
parent
edebd84426
commit
d4de54402c
@ -608,18 +608,23 @@ implementation
|
||||
end;
|
||||
{In the procedure the array range is 0..(upper_bound-lower_bound).}
|
||||
hightree:=caddnode.create(subn,r,l);
|
||||
typecheckpass(hightree);
|
||||
|
||||
{Replace the rangnode in the tree by its lower_bound, and
|
||||
dispose the rangenode.}
|
||||
temp:=Tvecnode(p).right;
|
||||
Tvecnode(p).right:=l.getcopy;
|
||||
|
||||
{Typecheckpass can only be performed *after* the l.getcopy since it
|
||||
can modify the tree, and l is in the hightree.}
|
||||
typecheckpass(hightree);
|
||||
|
||||
with Trangenode(temp) do
|
||||
begin
|
||||
left:=nil;
|
||||
right:=nil;
|
||||
end;
|
||||
temp.free;
|
||||
|
||||
{Tree changed from p[l..h] to p[l], recalculate resultdef.}
|
||||
p.resultdef:=nil;
|
||||
typecheckpass(p);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user