mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 09:50:58 +02:00
* fixed constant evaluation of not(byte/word/long/quadbool) + test
git-svn-id: trunk@10450 -
This commit is contained in:
parent
ff03c9569d
commit
761f2e5c93
@ -790,6 +790,8 @@ implementation
|
|||||||
bool64bit:
|
bool64bit:
|
||||||
begin
|
begin
|
||||||
v:=byte(not(boolean(int64(v))));
|
v:=byte(not(boolean(int64(v))));
|
||||||
|
if (torddef(left.resultdef).ordtype<>pasbool) then
|
||||||
|
v:=-v;
|
||||||
end;
|
end;
|
||||||
uchar,
|
uchar,
|
||||||
uwidechar,
|
uwidechar,
|
||||||
|
@ -62,7 +62,8 @@ begin
|
|||||||
writeln('Passed!');
|
writeln('Passed!');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
const
|
||||||
|
lb = longbool(false);
|
||||||
|
|
||||||
var
|
var
|
||||||
longres : longint;
|
longres : longint;
|
||||||
@ -145,6 +146,10 @@ Begin
|
|||||||
Write('Value should be FALSE...');
|
Write('Value should be FALSE...');
|
||||||
test(ord(byteboolres),0);
|
test(ord(byteboolres),0);
|
||||||
|
|
||||||
|
longboolres:=not(lb);
|
||||||
|
Write('Value should be $ffffffff...');
|
||||||
|
test(ord(longboolres),-1);
|
||||||
|
|
||||||
{ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! }
|
{ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! }
|
||||||
{ CURRENT_NODE : LOC_JUMP }
|
{ CURRENT_NODE : LOC_JUMP }
|
||||||
{ ???????????????????????}
|
{ ???????????????????????}
|
||||||
|
Loading…
Reference in New Issue
Block a user