+ handle constint+pointerconst in taddnode.simplify

git-svn-id: trunk@27491 -
This commit is contained in:
nickysn 2014-04-06 16:36:09 +00:00
parent bf1e15fd39
commit 4563b2994d

View File

@ -419,6 +419,11 @@ implementation
is_constintnode(right) and
(nodetype in [addn,subn])
) or
(
(rt = pointerconstn) and
is_constintnode(left) and
(nodetype=addn)
) or
(
(lt in [pointerconstn,niln]) and
(rt in [pointerconstn,niln]) and
@ -460,7 +465,7 @@ implementation
{ Recover }
t:=genintconstnode(0)
end
else if (lt=pointerconstn) then
else if (lt=pointerconstn) or (rt=pointerconstn) then
t := cpointerconstnode.create(qword(v),resultdef)
else
if is_integer(ld) then