瀏覽代碼

* When inlining currency (ordinal) multiplication, change resultdef to int64, in order to be consistent with behavior of generic handling. Fixes compilation faliure after r26500, Mantis #25565.

git-svn-id: trunk@26534 -
sergei 11 年之前
父節點
當前提交
8b3217815b
共有 1 個文件被更改,包括 10 次插入8 次删除
  1. 10 8
      compiler/nadd.pas

+ 10 - 8
compiler/nadd.pas

@@ -2642,6 +2642,16 @@ implementation
           end
         else
           begin
+            { can full 64-bit multiplication be handled inline? }
+            if not use_generic_mul64bit then
+              begin
+                { generic handling replaces this node with call to fpc_mul_int64,
+                  whose result is int64 }
+                if is_currency(resultdef) then
+                  resultdef:=s64inttype;
+                exit;
+              end;
+
             { when currency is used set the result of the
               parameters to s64bit, so they are not converted }
             if is_currency(resultdef) then
@@ -2650,14 +2660,6 @@ implementation
                 right.resultdef:=s64inttype;
               end;
 
-            { can full 64-bit multiplication be handled inline? }
-            if not use_generic_mul64bit then
-              begin
-                firstpass(left);
-                firstpass(right);
-                exit;
-              end;
-
             { otherwise, create the parameters for the helper }
             right := ccallparanode.create(
               cordconstnode.create(ord(cs_check_overflow in current_settings.localswitches),pasbool8type,true),