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

* don't use raw bitcasts for tc_int_2_real type conversions

git-svn-id: branches/jvmbackend@18521 -
Jonas Maebe преди 14 години
родител
ревизия
2bb13723ae
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      compiler/jvm/njvmcnv.pas

+ 4 - 2
compiler/jvm/njvmcnv.pas

@@ -549,7 +549,8 @@ implementation
           except for a few special cases }
 
         { float to int/enum explicit type conversion: get the bits }
-        if (left.resultdef.typ=floatdef) and
+        if (convtype<>tc_int_2_real) and
+           (left.resultdef.typ=floatdef) and
            (is_integer(resultdef) or
             (resultdef.typ=enumdef)) then
           begin
@@ -559,7 +560,8 @@ implementation
             exit;
           end;
         { int to float explicit type conversion: also use the bits }
-        if (is_integer(left.resultdef) or
+        if (convtype<>tc_int_2_real) and
+           (is_integer(left.resultdef) or
             (left.resultdef.typ=enumdef)) and
            (resultdef.typ=floatdef) then
           begin