mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 18:47:52 +02:00
* fix r7009, check also if the other node is integer type
git-svn-id: trunk@7032 -
This commit is contained in:
parent
6804d5bf90
commit
bc071f709c
@ -385,7 +385,7 @@ implementation
|
||||
end;
|
||||
|
||||
{ Add,Sub,Mul with constant 0 or 1? }
|
||||
if is_constintnode(right) then
|
||||
if is_constintnode(right) and is_integer(left.resultdef) then
|
||||
begin
|
||||
if tordconstnode(right).value = 0 then
|
||||
begin
|
||||
@ -406,7 +406,7 @@ implementation
|
||||
if assigned(result) then
|
||||
exit;
|
||||
end;
|
||||
if is_constintnode(left) then
|
||||
if is_constintnode(left) and is_integer(right.resultdef) then
|
||||
begin
|
||||
if tordconstnode(left).value = 0 then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user