Ver Fonte

* Procedures containing a non-local label should not be inlined.

git-svn-id: trunk@9809 -
daniel há 17 anos atrás
pai
commit
894dc04966
2 ficheiros alterados com 9 adições e 2 exclusões
  1. 4 1
      compiler/pexpr.pas
  2. 5 1
      compiler/rautils.pas

+ 4 - 1
compiler/pexpr.pas

@@ -1701,7 +1701,10 @@ implementation
                         if tlabelsym(srsym).defined then
                           Message(sym_e_label_already_defined);
                         if symtablestack.top.symtablelevel<>srsymtable.symtablelevel then
-                          tlabelsym(srsym).nonlocal:=true;
+                          begin
+                            tlabelsym(srsym).nonlocal:=true;
+                            exclude(current_procinfo.procdef.procoptions,po_inline);
+                          end;
                         tlabelsym(srsym).defined:=true;
                         p1:=clabelnode.create(nil,tlabelsym(srsym));
                         tlabelsym(srsym).code:=p1;

+ 5 - 1
compiler/rautils.pas

@@ -1420,7 +1420,11 @@ Begin
     labelsym :
       begin
         if symtablestack.top.symtablelevel<>srsymtable.symtablelevel then
-          Tlabelsym(sym).nonlocal:=true;
+          begin
+            Tlabelsym(sym).nonlocal:=true;
+            if emit then
+              exclude(current_procinfo.procdef.procoptions,po_inline);
+          end;
         if not(assigned(tlabelsym(sym).asmblocklabel)) then
           if Tlabelsym(sym).nonlocal then
             current_asmdata.getglobaljumplabel(tlabelsym(sym).asmblocklabel)