Browse Source

* check registers of ait_regalloc for a valid color when translating and compiling with -dextdebug

git-svn-id: trunk@30438 -
florian 10 năm trước cách đây
mục cha
commit
31709b1b43
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      compiler/rgobj.pas

+ 7 - 1
compiler/rgobj.pas

@@ -1800,7 +1800,12 @@ unit rgobj;
                           end
                           end
                         else
                         else
                           begin
                           begin
-                            setsupreg(reg,reginfo[getsupreg(reg)].colour);
+                            u:=reginfo[getsupreg(reg)].colour;
+{$ifdef EXTDEBUG}
+                            if u>=maxreginfo then
+                              internalerror(2015040501);
+{$endif}
+                            setsupreg(reg,u);
                             {
                             {
                               Remove sequences of release and
                               Remove sequences of release and
                               allocation of the same register like. Other combinations
                               allocation of the same register like. Other combinations
@@ -2411,3 +2416,4 @@ unit rgobj;
       end;
       end;
 
 
 end.
 end.
+