Fix the handling of imports of the init and finalize functions now that the symbols are correctly registered

ngenutil.pas, tnodeutils:
  * InsertInitFinalTable: the init and finalize functions are in the *local* symboltable not the global one
  * InsertInitFinalTable.add_initfinal_import: reenable the internal error

git-svn-id: trunk@33508 -
This commit is contained in:
svenbarth 2016-04-14 21:32:53 +00:00
parent e2b1f70ac6
commit 86478fa781

View File

@ -770,8 +770,8 @@ implementation
if foundinit and foundfini then
break;
end;
{if not foundinit or not foundfini then
internalerror(2016041401);}
if not foundinit or not foundfini then
internalerror(2016041401);
end;
begin
@ -815,7 +815,7 @@ implementation
end
else
unitinits.emit_tai(Tai_const.Create_nil_codeptr,voidcodepointertype);
add_initfinal_import(hp.u.globalsymtable);
add_initfinal_import(hp.u.localsymtable);
inc(count);
end;
hp:=tused_unit(hp.next);