* It is still needed to release the temp allocated for the result of an assembler function if the result is not referenced. This fixes some EXTDEBUG warnings.

This commit is contained in:
Yuriy Sydorov 2021-08-06 21:43:10 +03:00
parent 5920d169c0
commit 136f042972

View File

@ -5414,8 +5414,13 @@ implementation
(po_nostackframe in current_procinfo.procdef.procoptions) (po_nostackframe in current_procinfo.procdef.procoptions)
) )
) then ) then
begin
ressym:=current_procinfo.procdef.funcretsym;
if not assigned(ressym) then
exit; exit;
end
else
begin
{ constructors return self } { constructors return self }
if current_procinfo.procdef.generate_safecall_wrapper then if current_procinfo.procdef.generate_safecall_wrapper then
begin begin
@ -5437,6 +5442,8 @@ implementation
else else
gen_load_uninitialized_function_result(list,current_procinfo.procdef,retdef,current_procinfo.procdef.funcretloc[calleeside]); gen_load_uninitialized_function_result(list,current_procinfo.procdef,retdef,current_procinfo.procdef.funcretloc[calleeside]);
end; end;
end;
if tabstractnormalvarsym(ressym).localloc.loc=LOC_REFERENCE then if tabstractnormalvarsym(ressym).localloc.loc=LOC_REFERENCE then
tg.UnGetLocal(list,tabstractnormalvarsym(ressym).localloc.reference); tg.UnGetLocal(list,tabstractnormalvarsym(ressym).localloc.reference);
end; end;