浏览代码

* remove explicit cast to int64 to avoid an internalerror 200706094, resolves #33004

git-svn-id: trunk@37946 -
florian 7 年之前
父节点
当前提交
52aa40c3b0
共有 3 个文件被更改,包括 16 次插入1 次删除
  1. 1 0
      .gitattributes
  2. 1 1
      compiler/x86/nx86mat.pas
  3. 14 0
      tests/webtbs/tw33004.pp

+ 1 - 0
.gitattributes

@@ -15948,6 +15948,7 @@ tests/webtbs/tw3292.pp svneol=native#text/plain
 tests/webtbs/tw32938.pp svneol=native#text/pascal
 tests/webtbs/tw3294a.pp svneol=native#text/plain
 tests/webtbs/tw3298.pp svneol=native#text/plain
+tests/webtbs/tw33004.pp svneol=native#text/pascal
 tests/webtbs/tw3301.pp svneol=native#text/plain
 tests/webtbs/tw3309.pp svneol=native#text/plain
 tests/webtbs/tw3320.pp svneol=native#text/plain

+ 1 - 1
compiler/x86/nx86mat.pas

@@ -412,7 +412,7 @@ interface
 
         if (nodetype=divn) and (right.nodetype=ordconstn) then
           begin
-            if isabspowerof2(int64(tordconstnode(right).value),power) then
+            if isabspowerof2(tordconstnode(right).value,power) then
               begin
                 { for signed numbers, the numerator must be adjusted before the
                   shift instruction, but not wih unsigned numbers! Otherwise,

+ 14 - 0
tests/webtbs/tw33004.pp

@@ -0,0 +1,14 @@
+program Project1;
+
+const
+  Inputs: array[0..2] of QWord = (500, $4563918244F40000,QWord($8AC7230489E80000));
+
+var X, Y: QWord; C: Integer;
+begin
+  for C := Low(Inputs) to High(Inputs) do
+  begin
+    X := Inputs[C];
+    Y := X div QWord($8AC7230489E80000);
+    WriteLn(X, ' div 10,000,000,000,000,000,000 = ', Y);
+  end;
+end.