mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 03:48:07 +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:
|
||||
begin
|
||||
v:=byte(not(boolean(int64(v))));
|
||||
if (torddef(left.resultdef).ordtype<>pasbool) then
|
||||
v:=-v;
|
||||
end;
|
||||
uchar,
|
||||
uwidechar,
|
||||
|
@ -62,7 +62,8 @@ begin
|
||||
writeln('Passed!');
|
||||
end;
|
||||
|
||||
|
||||
const
|
||||
lb = longbool(false);
|
||||
|
||||
var
|
||||
longres : longint;
|
||||
@ -145,6 +146,10 @@ Begin
|
||||
Write('Value should be FALSE...');
|
||||
test(ord(byteboolres),0);
|
||||
|
||||
longboolres:=not(lb);
|
||||
Write('Value should be $ffffffff...');
|
||||
test(ord(longboolres),-1);
|
||||
|
||||
{ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! }
|
||||
{ CURRENT_NODE : LOC_JUMP }
|
||||
{ ???????????????????????}
|
||||
|
Loading…
Reference in New Issue
Block a user