* don't load data in a register when converting from void to an integer

type (like with integer(pointer1^):=integer(pointer2^))

git-svn-id: trunk@32743 -
This commit is contained in:
Jonas Maebe 2015-12-26 20:01:44 +00:00
parent 205136f924
commit e3d2980c98

View File

@ -108,7 +108,8 @@ procedure tllvmtypeconvnode.second_int_to_int;
tosize:=resultdef.size;
location_copy(location,left.location);
if not(left.location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) or
(fromsize<>tosize) then
((fromsize<>tosize) and
not is_void(left.resultdef)) then
begin
hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,resultdef,left.location.loc=LOC_CREGISTER);
end