mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 20:30:29 +02:00
* properly simplify not(<const. cbool>), resolves #25255
git-svn-id: trunk@26803 -
This commit is contained in:
parent
d185122799
commit
6e1bf4d040
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13802,6 +13802,7 @@ tests/webtbs/tw25170.pp svneol=native#text/plain
|
||||
tests/webtbs/tw25198.pp svneol=native#text/plain
|
||||
tests/webtbs/tw25210.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2525.pp svneol=native#text/plain
|
||||
tests/webtbs/tw25255.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw25269.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw25289.pp svneol=native#text/plain
|
||||
tests/webtbs/tw25296.pp svneol=native#text/plain
|
||||
|
@ -1074,15 +1074,17 @@ implementation
|
||||
pasbool8,
|
||||
pasbool16,
|
||||
pasbool32,
|
||||
pasbool64,
|
||||
pasbool64:
|
||||
v:=byte(not(boolean(int64(v))));
|
||||
bool8bit,
|
||||
bool16bit,
|
||||
bool32bit,
|
||||
bool64bit:
|
||||
begin
|
||||
v:=byte(not(boolean(int64(v))));
|
||||
if is_cbool(left.resultdef) then
|
||||
v:=-v;
|
||||
if v=0 then
|
||||
v:=-1
|
||||
else
|
||||
v:=0;
|
||||
end;
|
||||
uchar,
|
||||
uwidechar,
|
||||
|
10
tests/webtbs/tw25255.pp
Normal file
10
tests/webtbs/tw25255.pp
Normal file
@ -0,0 +1,10 @@
|
||||
begin
|
||||
if not(qwordbool($8000000000000000)) then
|
||||
halt(1);
|
||||
if not(longbool($80000000)) then
|
||||
halt(1);
|
||||
if not(wordbool($8000)) then
|
||||
halt(1);
|
||||
writeln('ok');
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user