* don't set varsym.localloc anymore in gen_alloc_regvar(): in most cases

initialloc was already set afterwards, now it's also done in the final
    case (and allocating the initial location should be different from
    setting the current location)

git-svn-id: trunk@34085 -
This commit is contained in:
Jonas Maebe 2016-07-08 07:46:48 +00:00
parent cd5817a689
commit fb0f4394c0

View File

@ -773,7 +773,6 @@ implementation
else
varloc:=tai_varloc.create(sym,sym.initialloc.register);
list.concat(varloc);
sym.localloc:=sym.initialloc;
end;
@ -1324,7 +1323,10 @@ implementation
{ gen_load_cgpara_loc() already allocated the initialloc
-> don't allocate again }
if currpara.initialloc.loc in [LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMREGISTER] then
gen_alloc_regvar(list,currpara,false);
begin
gen_alloc_regvar(list,currpara,false);
hlcg.varsym_set_localloc(list,currpara);
end;
end;
{ generate copies of call by value parameters, must be done before