浏览代码

Fix bug report #41384

Pierre Muller 1 周之前
父节点
当前提交
0b84ccd555
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/ninl.pas

+ 3 - 1
compiler/ninl.pas

@@ -527,12 +527,14 @@ implementation
                   if varspez=vs_const then
                     include(tabstractvarsym(srsym).varoptions,vo_is_typed_const);
                   include(tabstractvarsym(srsym).varoptions,vo_is_default_var);
+                  { There is no reliable way to be sure that this symbol will not be used
+                    later on inside some inlined code, so mark it as global }
+                  include(tabstractvarsym(srsym).varoptions,vo_is_public);
                   { The variable has a value assigned }
                   tabstractvarsym(srsym).varstate:=vs_initialised;
 
                   srsymtable.insertsym(srsym);
                   cnodeutils.insertbssdata(tstaticvarsym(srsym));
-
                 end;
               result:=cloadnode.create(srsym,srsymtable);
             end