Browse Source

hlcgobj.pas, thlcgobj:
* g_call_system_proc: if we directly call a symbol of the system unit from another unit then it must be considered as imported as well

git-svn-id: trunk@33886 -

svenbarth 9 years ago
parent
commit
99189db897
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/hlcgobj.pas

+ 4 - 0
compiler/hlcgobj.pas

@@ -5202,6 +5202,8 @@ implementation
     begin
       pd:=search_system_proc(procname);
       pd.init_paraloc_info(callerside);
+      if systemunit<>current_module.globalsymtable then
+        current_module.addimportedsym(pd.procsym);
       result:=g_call_system_proc_intern(list,pd,paras,forceresdef);
     end;
 
@@ -5211,6 +5213,8 @@ implementation
         override, if any, is g_call_system_proc_intern (and that none of
         the g_call_system_proc variants should be made virtual) }
       pd.init_paraloc_info(callerside);
+      if systemunit<>current_module.globalsymtable then
+        current_module.addimportedsym(pd.procsym);
       result:=g_call_system_proc_intern(list,pd,paras,forceresdef);
     end;