mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-11 22:39:33 +01:00
+ handle constint+pointerconst in taddnode.simplify
git-svn-id: trunk@27491 -
This commit is contained in:
parent
bf1e15fd39
commit
4563b2994d
@ -419,6 +419,11 @@ implementation
|
|||||||
is_constintnode(right) and
|
is_constintnode(right) and
|
||||||
(nodetype in [addn,subn])
|
(nodetype in [addn,subn])
|
||||||
) or
|
) or
|
||||||
|
(
|
||||||
|
(rt = pointerconstn) and
|
||||||
|
is_constintnode(left) and
|
||||||
|
(nodetype=addn)
|
||||||
|
) or
|
||||||
(
|
(
|
||||||
(lt in [pointerconstn,niln]) and
|
(lt in [pointerconstn,niln]) and
|
||||||
(rt in [pointerconstn,niln]) and
|
(rt in [pointerconstn,niln]) and
|
||||||
@ -460,7 +465,7 @@ implementation
|
|||||||
{ Recover }
|
{ Recover }
|
||||||
t:=genintconstnode(0)
|
t:=genintconstnode(0)
|
||||||
end
|
end
|
||||||
else if (lt=pointerconstn) then
|
else if (lt=pointerconstn) or (rt=pointerconstn) then
|
||||||
t := cpointerconstnode.create(qword(v),resultdef)
|
t := cpointerconstnode.create(qword(v),resultdef)
|
||||||
else
|
else
|
||||||
if is_integer(ld) then
|
if is_integer(ld) then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user