mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 07:34:28 +02:00
* New test for #41079
This commit is contained in:
parent
3f66d043f8
commit
984758794e
24
tests/webtbs/tw41079.pp
Normal file
24
tests/webtbs/tw41079.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user