* New test for #41079

This commit is contained in:
J. Gareth "Curious Kit" Moreton 2025-04-03 18:57:07 +01:00 committed by J. Gareth "Kit" Moreton
parent 3f66d043f8
commit 984758794e

24
tests/webtbs/tw41079.pp Normal file
View File

@ -0,0 +1,24 @@
{ %OPT=-O2 }
program tw41079;
var
A, B, C: QWord;
Fail: Boolean;
begin
A := 140737488355327;
WriteLn('A : ',BinStr(A, 64));
B := (A shr 47) shl 48;
WriteLn('(A shr 47) shl 48: ',BinStr(B, 64));
Fail := B <> 0;
C := A shr 47;
WriteLn('C := A shr 47 : ',BinStr(C, 64));
Fail := Fail or (C <> 0);
C := C shl 48;
WriteLn('C := C shl 48 : ',BinStr(C, 64));
Fail := Fail or (C <> 0);
if Fail then
begin
WriteLn('FAILED');
Halt(1);
end;
WriteLn('ok');
end.