Explorar o código

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

git-svn-id: trunk@30438 -
florian %!s(int64=10) %!d(string=hai) anos
pai
achega
31709b1b43
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      compiler/rgobj.pas

+ 7 - 1
compiler/rgobj.pas

@@ -1800,7 +1800,12 @@ unit rgobj;
                           end
                         else
                           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
                               allocation of the same register like. Other combinations
@@ -2411,3 +2416,4 @@ unit rgobj;
       end;
 
 end.
+