mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 18:30:32 +02:00
* try_make_mul32to64: restore original node order if transformation failed
o this gets called by taddnode.pass_1, which caches the left/right node types/resultdefs git-svn-id: trunk@47158 -
This commit is contained in:
parent
51d6622148
commit
0729340817
@ -3569,12 +3569,16 @@ implementation
|
|||||||
var
|
var
|
||||||
temp: tnode;
|
temp: tnode;
|
||||||
leftoriginallysigned,
|
leftoriginallysigned,
|
||||||
canbesignedconst, canbeunsignedconst: boolean;
|
canbesignedconst, canbeunsignedconst, swapped: boolean;
|
||||||
begin
|
begin
|
||||||
result := false;
|
result := false;
|
||||||
|
swapped := false;
|
||||||
{ make sure that if there is a constant, that it's on the right }
|
{ make sure that if there is a constant, that it's on the right }
|
||||||
if left.nodetype = ordconstn then
|
if left.nodetype = ordconstn then
|
||||||
swapleftright;
|
begin
|
||||||
|
swapleftright;
|
||||||
|
swapped := true;
|
||||||
|
end;
|
||||||
if is_32to64typeconv(left) then
|
if is_32to64typeconv(left) then
|
||||||
begin
|
begin
|
||||||
leftoriginallysigned:=is_signed(ttypeconvnode(left).left.resultdef);
|
leftoriginallysigned:=is_signed(ttypeconvnode(left).left.resultdef);
|
||||||
@ -3613,6 +3617,10 @@ implementation
|
|||||||
result := true;
|
result := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
{ pass_Typecheck caches left/right type and resultdef, so restore the
|
||||||
|
original order }
|
||||||
|
if not result and swapped then
|
||||||
|
swapleftright;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user