mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-21 05:09:31 +02:00
* increase refs of hidden high parameter if the corresponding open/const array is used
git-svn-id: trunk@27331 -
This commit is contained in:
parent
601d210763
commit
a4b6e99db1
@ -1521,6 +1521,7 @@ implementation
|
|||||||
|
|
||||||
var
|
var
|
||||||
i : longint;
|
i : longint;
|
||||||
|
highsym,
|
||||||
sym : tsym;
|
sym : tsym;
|
||||||
vs : tabstractnormalvarsym;
|
vs : tabstractnormalvarsym;
|
||||||
isaddr : boolean;
|
isaddr : boolean;
|
||||||
@ -1561,6 +1562,16 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
{ if an open array is used, also its high parameter is used,
|
||||||
|
since the hidden high parameters are inserted after the corresponding symbols,
|
||||||
|
we can increase the ref. count here }
|
||||||
|
if is_open_array(vs.vardef) or is_array_of_const(vs.vardef) then
|
||||||
|
begin
|
||||||
|
highsym:=get_high_value_sym(tparavarsym(vs));
|
||||||
|
if assigned(highsym) then
|
||||||
|
inc(highsym.refs);
|
||||||
|
end;
|
||||||
|
|
||||||
isaddr:=paramanager.push_addr_param(vs.varspez,vs.vardef,pd.proccalloption);
|
isaddr:=paramanager.push_addr_param(vs.varspez,vs.vardef,pd.proccalloption);
|
||||||
if isaddr then
|
if isaddr then
|
||||||
vs.initialloc.size:=OS_ADDR
|
vs.initialloc.size:=OS_ADDR
|
||||||
|
Loading…
Reference in New Issue
Block a user