Переглянути джерело

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

git-svn-id: trunk@30438 -
florian 10 роки тому
батько
коміт
31709b1b43
1 змінених файлів з 7 додано та 1 видалено
  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.
+