mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 07:19:14 +02:00
Check that inserttypeconv really change node type to ttypeconvnode before setting convtype field (should fix taddbool.pp bytebool failure on powerpc)
git-svn-id: trunk@42692 -
This commit is contained in:
parent
81fba52adb
commit
f82cc96cb9
@ -1663,7 +1663,12 @@ implementation
|
|||||||
if is_cbool(ld) then
|
if is_cbool(ld) then
|
||||||
begin
|
begin
|
||||||
inserttypeconv(left,pasbool8type);
|
inserttypeconv(left,pasbool8type);
|
||||||
ttypeconvnode(left).convtype:=tc_bool_2_bool;
|
{ inserttypeconv might already simplify
|
||||||
|
the typeconvnode after insertion,
|
||||||
|
thus we need to check if it still
|
||||||
|
really is a typeconv node }
|
||||||
|
if left is ttypeconvnode then
|
||||||
|
ttypeconvnode(left).convtype:=tc_bool_2_bool;
|
||||||
if not is_cbool(rd) or
|
if not is_cbool(rd) or
|
||||||
(ld.size>=rd.size) then
|
(ld.size>=rd.size) then
|
||||||
resultdef:=ld;
|
resultdef:=ld;
|
||||||
@ -1671,7 +1676,12 @@ implementation
|
|||||||
if is_cbool(rd) then
|
if is_cbool(rd) then
|
||||||
begin
|
begin
|
||||||
inserttypeconv(right,pasbool8type);
|
inserttypeconv(right,pasbool8type);
|
||||||
ttypeconvnode(right).convtype:=tc_bool_2_bool;
|
{ inserttypeconv might already simplify
|
||||||
|
the typeconvnode after insertion,
|
||||||
|
thus we need to check if it still
|
||||||
|
really is a typeconv node }
|
||||||
|
if right is ttypeconvnode then
|
||||||
|
ttypeconvnode(right).convtype:=tc_bool_2_bool;
|
||||||
if not assigned(resultdef) then
|
if not assigned(resultdef) then
|
||||||
resultdef:=rd;
|
resultdef:=rd;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user