Explorar o código

* 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 -

Jonas Maebe %!s(int64=9) %!d(string=hai) anos
pai
achega
e3d2980c98
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      compiler/llvm/nllvmcnv.pas

+ 2 - 1
compiler/llvm/nllvmcnv.pas

@@ -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