Pārlūkot izejas kodu

* only make the target of a type conversion not regable after checking
whether it's assignable if 1) the size/sign changes (was already the
case) and 2) in case something actually can be assigned to it

git-svn-id: trunk@12039 -

Jonas Maebe 16 gadi atpakaļ
vecāks
revīzija
c6c9ec83e0
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      compiler/ncnv.pas

+ 2 - 1
compiler/ncnv.pas

@@ -2962,7 +2962,8 @@ implementation
           that will load the value in a new register first }
         { the same goes for changing the sign of equal-sized values which
           are smaller than an entire register }
-        if (resultdef.size<left.resultdef.size) or
+        if result and
+           (resultdef.size<left.resultdef.size) or
            ((resultdef.size=left.resultdef.size) and
             (left.resultdef.size<sizeof(aint)) and
             (is_signed(resultdef) xor is_signed(left.resultdef))) then