* Fixed expectloc of local variables passed as a formal parameter. This issue is caught by cycling the compiler with -dEXTDEBUG. Yet the compiler can't cycle with EXTDEBUG due to other issues with wrong expectloc.

git-svn-id: trunk@48650 -
This commit is contained in:
yury 2021-02-11 10:39:41 +00:00
parent 71c314d7d4
commit 4245b20a32

View File

@ -1392,6 +1392,16 @@ implementation
else
make_not_regable(left,[ra_addr_regable])
end;
vs_const:
if parasym.vardef.typ=formaldef then
begin
{ compilerprocs never capture the address of their
parameters }
if not(po_compilerproc in aktcallnode.procdefinition.procoptions) then
make_not_regable(left,[ra_addr_regable,ra_addr_taken])
else
make_not_regable(left,[ra_addr_regable])
end;
else
set_varstate(left,vs_read,[vsf_must_be_valid]);
end;