* fixed crash in r30244 (we only have to get a new elementdef if we didn't

already initialise the location, and we won't get a new elementdef if
    the location is already assigned)

git-svn-id: branches/hlcgllvm@30346 -
This commit is contained in:
Jonas Maebe 2015-03-28 11:33:59 +00:00
parent 25e6eaf07f
commit 5a2609933f

View File

@ -155,9 +155,12 @@ implementation
if (resultdef.typ=floatdef) and
(tfloatdef(resultdef).floattype=s80real) then
begin
{ avoid uninitialised warning }
arrptrelementdef:=nil;
getarrelementptrdef;
if not assigned(locref) then
begin
{ avoid uninitialised warning }
arrptrelementdef:=nil;
getarrelementptrdef;
end;
hreg:=hlcg.getaddressregister(current_asmdata.CurrAsmList,getpointerdef(resultdef));
hlcg.a_load_reg_reg(current_asmdata.CurrAsmList,arrptrelementdef,getpointerdef(resultdef),locref^.base,hreg);
locref^.base:=hreg;