mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 22:09:33 +02:00
* only initialize global regvars in unit and main program init code
(bug in r35461) git-svn-id: trunk@35462 -
This commit is contained in:
parent
cadf177a93
commit
b86f2d7e3c
@ -4535,13 +4535,11 @@ implementation
|
||||
|
||||
procedure thlcgobj.gen_initialize_code(list: TAsmList);
|
||||
begin
|
||||
{ initialize register variables }
|
||||
{ initialize global register variables }
|
||||
case current_procinfo.procdef.proctypeoption of
|
||||
{ global regvars are only initialised in unitinitialize, and only
|
||||
finalized in unitfinalize }
|
||||
potype_unitfinalize: ;
|
||||
else
|
||||
TSymtable(current_module.localsymtable).SymList.ForEachCall(@initialize_regvars,list);
|
||||
potype_unitinit,
|
||||
potype_proginit:
|
||||
TSymtable(current_module.localsymtable).SymList.ForEachCall(@initialize_regvars,list);
|
||||
end;
|
||||
|
||||
{ initialises temp. ansi/wide string data }
|
||||
|
Loading…
Reference in New Issue
Block a user