Преглед изворни кода

* also check for valid min/maxlabel range for jumptable in case
of cs_opt_size

git-svn-id: trunk@8281 -

Jonas Maebe пре 18 година
родитељ
комит
1c71bb36a1
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      compiler/ncgset.pas

+ 2 - 0
compiler/ncgset.pas

@@ -765,6 +765,8 @@ implementation
                    if cs_opt_size in current_settings.optimizerswitches  then
                      begin
                        if has_jumptable and
+                          (min_label>=int64(low(aint))) and
+                          (max_label<=high(aint)) and
                           not((labelcnt<=2) or
                               ((max_label-min_label)<0) or
                               ((max_label-min_label)>3*labelcnt)) then