mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 03:48:07 +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
|
||||
temp: tnode;
|
||||
leftoriginallysigned,
|
||||
canbesignedconst, canbeunsignedconst: boolean;
|
||||
canbesignedconst, canbeunsignedconst, swapped: boolean;
|
||||
begin
|
||||
result := false;
|
||||
swapped := false;
|
||||
{ make sure that if there is a constant, that it's on the right }
|
||||
if left.nodetype = ordconstn then
|
||||
swapleftright;
|
||||
begin
|
||||
swapleftright;
|
||||
swapped := true;
|
||||
end;
|
||||
if is_32to64typeconv(left) then
|
||||
begin
|
||||
leftoriginallysigned:=is_signed(ttypeconvnode(left).left.resultdef);
|
||||
@ -3613,6 +3617,10 @@ implementation
|
||||
result := true;
|
||||
end;
|
||||
end;
|
||||
{ pass_Typecheck caches left/right type and resultdef, so restore the
|
||||
original order }
|
||||
if not result and swapped then
|
||||
swapleftright;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user