Browse Source

* fixed crash when compiling inlined procedures containing labels

git-svn-id: trunk@9804 -
Jonas Maebe 17 năm trước cách đây
mục cha
commit
1f1a43d7f0
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      compiler/ncgflw.pas

+ 4 - 1
compiler/ncgflw.pas

@@ -877,7 +877,10 @@ implementation
     function tcglabelnode.getasmlabel : tasmlabel;
     function tcglabelnode.getasmlabel : tasmlabel;
       begin
       begin
         if not(assigned(asmlabel)) then
         if not(assigned(asmlabel)) then
-          if labsym.nonlocal then
+          { labsym is not set in inlined procedures, but since assembler }
+          { routines can't be inlined, that shouldn't matter             }
+          if assigned(labsym) and
+             labsym.nonlocal then
             current_asmdata.getglobaljumplabel(asmlabel)
             current_asmdata.getglobaljumplabel(asmlabel)
           else
           else
             current_asmdata.getjumplabel(asmlabel);
             current_asmdata.getjumplabel(asmlabel);