Local symbols and defs that are needed for packages need to be registered as well => register the symbols and defs for the init and finalize functions.

pmodules.pas:
  * create_main_proc: register the proc's symbol
ngenutil.pas, tnodeutils:
  * create_main_procdef: register the proc's def

git-svn-id: trunk@33507 -
This commit is contained in:
svenbarth 2016-04-14 21:30:36 +00:00
parent ea8322ee80
commit e2b1f70ac6
2 changed files with 4 additions and 0 deletions

View File

@ -653,6 +653,8 @@ implementation
pd:=cprocdef.create(main_program_level,true)
else
pd:=cprocdef.create(normal_function_level,true);
{ always register the def }
pd.register_def;
pd.procsym:=ps;
ps.ProcdefList.Add(pd);
include(pd.procoptions,po_global);

View File

@ -605,6 +605,8 @@ implementation
internalerror(200304275);
{Generate a procsym for main}
ps:=cprocsym.create('$'+name);
{ always register the symbol }
ps.register_sym;
{ main are allways used }
inc(ps.refs);
st.insert(ps);