* do not set nonlocal for inter-procedural labels, this is not needed, they use

the jmpbuf to reach the target

git-svn-id: trunk@46907 -
This commit is contained in:
florian 2020-09-20 18:57:00 +00:00
parent 0904ea0c3f
commit 0bdc1fdea4
3 changed files with 4 additions and 9 deletions

View File

@ -2202,7 +2202,6 @@ implementation
if assigned(labelsym.jumpbuf) then
begin
labelsym.nonlocal:=true;
result:=ccallnode.createintern('fpc_longjmp',
ccallparanode.create(cordconstnode.create(1,sinttype,true),
ccallparanode.create(cloadnode.create(labelsym.jumpbuf,labelsym.jumpbuf.owner),

View File

@ -3390,12 +3390,10 @@ implementation
Message(sym_e_label_already_defined);
if symtablestack.top.symtablelevel<>srsymtable.symtablelevel then
begin
tlabelsym(srsym).nonlocal:=true;
include(current_procinfo.flags,pi_has_interproclabel);
if (current_procinfo.procdef.proctypeoption in [potype_unitinit,potype_unitfinalize]) then
Message(sym_e_interprocgoto_into_init_final_code_not_allowed);
end;
if tlabelsym(srsym).nonlocal and
(current_procinfo.procdef.proctypeoption in [potype_unitinit,potype_unitfinalize]) then
Message(sym_e_interprocgoto_into_init_final_code_not_allowed);
tlabelsym(srsym).defined:=true;
p1:=clabelnode.create(nil,tlabelsym(srsym));
tlabelsym(srsym).code:=p1;

View File

@ -1281,12 +1281,10 @@ implementation
Message(sym_e_label_already_defined);
if symtablestack.top.symtablelevel<>srsymtable.symtablelevel then
begin
tlabelsym(srsym).nonlocal:=true;
include(current_procinfo.flags,pi_has_interproclabel);
if (current_procinfo.procdef.proctypeoption in [potype_unitinit,potype_unitfinalize]) then
Message(sym_e_interprocgoto_into_init_final_code_not_allowed);
end;
if tlabelsym(srsym).nonlocal and
(current_procinfo.procdef.proctypeoption in [potype_unitinit,potype_unitfinalize]) then
Message(sym_e_interprocgoto_into_init_final_code_not_allowed);
tlabelsym(srsym).defined:=true;
p:=clabelnode.create(nil,tlabelsym(srsym));