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

git-svn-id: trunk@37946 -
This commit is contained in:
florian 2018-01-11 21:02:39 +00:00
parent 1a69c49e81
commit 52aa40c3b0
3 changed files with 16 additions and 1 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
tests/webtbs/tw33004.pp Normal file
View File

@ -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.