mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-06 14:27:33 +01:00
* Fix tests for constexprint rework.
git-svn-id: trunk@7638 -
This commit is contained in:
parent
b15740c0e5
commit
02732bfb55
@ -1,7 +1,7 @@
|
||||
{ %fail }
|
||||
|
||||
const
|
||||
c1 = high(int64)-1;
|
||||
c1 = high(qword)-1;
|
||||
{ Overflow }
|
||||
c2 = c1+2;
|
||||
begin
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{ %fail }
|
||||
|
||||
const
|
||||
c1 = high(int64)-1;
|
||||
c1 = high(qword)-1;
|
||||
{ Overflow }
|
||||
c2 = c1*2;
|
||||
begin
|
||||
|
||||
@ -415,9 +415,10 @@ begin
|
||||
if j <> k then
|
||||
result := false;
|
||||
|
||||
{ The next statement would create an range check error }
|
||||
{$R-}
|
||||
if j <> (1000000000-(qword(1000000000) * 10)) then
|
||||
{ Since qword variable<>negative constant is always false according to the
|
||||
compiler (allowing it to optimize the if away) we need to do a preventive
|
||||
typecast to qword.}
|
||||
if j <> qword(1000000000-(qword(1000000000) * 10)) then
|
||||
result := false;
|
||||
j := (qword(1) shl 33);
|
||||
i := (qword(1) shl 34) - j;
|
||||
@ -425,7 +426,10 @@ begin
|
||||
result := false;
|
||||
|
||||
i := 1 - j;
|
||||
if (i <> (1-(qword(1) shl 33))) then
|
||||
{ Since qword variable<>negative constant is always false according to the
|
||||
compiler (allowing it to optimize the if away) we need to do a preventive
|
||||
typecast to qword.}
|
||||
if i <> qword(1-(qword(1) shl 33)) then
|
||||
result := false;
|
||||
|
||||
i := 100000;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user