mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 00:09:32 +02:00
* when generating the call to the extracted function reference inside the nested routine we need to use the parameters of the nested function and not those of the newly created procdef (fixes some of the test case failures with -O2)
This commit is contained in:
parent
965bba5ab4
commit
b11366c95b
@ -1029,7 +1029,7 @@ implementation
|
||||
fieldsym:=nil;
|
||||
if assigned(pinested) then
|
||||
begin
|
||||
n1:=ccallnode.create(create_paras(pd),ps,capturedef.symtable,cloadnode.create(capturer,capturer.owner),[],nil);
|
||||
n1:=ccallnode.create(create_paras(pinested.procdef),ps,capturedef.symtable,cloadnode.create(capturer,capturer.owner),[],nil);
|
||||
{ captured variables cannot be in registers }
|
||||
make_not_regable(tcallnode(n1).methodpointer,[ra_addr_regable,ra_addr_taken]);
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user