* properly simplify not(<const. cbool>), resolves #25255

git-svn-id: trunk@26803 -
This commit is contained in:
florian 2014-02-16 20:20:58 +00:00
parent d185122799
commit 6e1bf4d040
3 changed files with 17 additions and 4 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
View 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.