* initialize file variables in iso mode

git-svn-id: trunk@15681 -
This commit is contained in:
florian 2010-07-31 20:43:37 +00:00
parent 73d788ff96
commit 67416e958b
2 changed files with 5 additions and 2 deletions

View File

@ -1470,7 +1470,9 @@ implementation
) and
not(vo_is_typed_const in tabstractvarsym(p).varoptions) and
not(vo_is_external in tabstractvarsym(p).varoptions) and
is_managed_type(tabstractvarsym(p).vardef) then
(is_managed_type(tabstractvarsym(p).vardef) or
((m_iso in current_settings.modeswitches) and (tabstractvarsym(p).vardef.typ=filedef))
) then
begin
OldAsmList:=current_asmdata.CurrAsmList;
current_asmdata.CurrAsmList:=TAsmList(arg);

View File

@ -312,7 +312,8 @@ implementation
ccallnode.createintern('fpc_getmem',para)));
{ create call to fpc_initialize }
if is_managed_type(tpointerdef(p.resultdef).pointeddef) then
if is_managed_type(tpointerdef(p.resultdef).pointeddef) or
((m_iso in current_settings.modeswitches) and (tpointerdef(p.resultdef).pointeddef.typ=filedef)) then
addstatement(newstatement,initialize_data_node(cderefnode.create(ctemprefnode.create(temp))));
{ copy the temp to the destination }