Преглед на файлове

* in case a 32x32 -> 64 multiplication is converted into shl, the type casts need to be restored

git-svn-id: trunk@44197 -
florian преди 5 години
родител
ревизия
27e89e07a3
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      compiler/nadd.pas

+ 4 - 0
compiler/nadd.pas

@@ -3903,6 +3903,10 @@ implementation
                  ((right.nodetype = ordconstn) and
                   ispowerof2(tordconstnode(right).value,i2))) then
                begin
+                 { it could be that we are converting a 32x32 -> 64 multiplication:
+                   in this case, we have to restore the type conversion }
+                 inserttypeconv_internal(left,resultdef);
+                 inserttypeconv_internal(right,resultdef);
                  if ((left.nodetype = ordconstn) and
                      ispowerof2(tordconstnode(left).value,i)) then
                    begin