* do not load unused parameters, as their localloc has not been set (and

there is no point in doing so if it were)
   o fixes compilation of RTL with LLVM/AArch64

git-svn-id: trunk@45478 -
This commit is contained in:
Jonas Maebe 2020-05-23 19:03:14 +00:00
parent 809fb83334
commit aa243faab8

View File

@ -5101,6 +5101,8 @@ implementation
for i:=0 to current_procinfo.procdef.paras.count-1 do
begin
currpara:=tparavarsym(current_procinfo.procdef.paras[i]);
if not currpara.is_used then
continue;
{ don't use currpara.vardef, as this will be wrong in case of
call-by-reference parameters (it won't contain the pointer) }
gen_load_cgpara_loc(list,currpara.paraloc[calleeside].def,currpara.paraloc[calleeside],currpara.initialloc,paramanager.param_use_paraloc(currpara.paraloc[calleeside]));