Browse Source

Merged revisions 7032 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r7032 | peter | 2007-03-30 08:51:23 +0200 (Fri, 30 Mar 2007) | 2 lines

* fix r7009, check also if the other node is integer type

........

git-svn-id: branches/fixes_2_2@7033 -

peter 18 năm trước cách đây
mục cha
commit
fa4c80b11c
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      compiler/nadd.pas

+ 2 - 2
compiler/nadd.pas

@@ -429,7 +429,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
@@ -450,7 +450,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