* Win64 exception handling: don't reset fc_unwind control flow flag at the beginning of try..except blocks. Resolves #24342.

git-svn-id: trunk@24385 -
This commit is contained in:
sergei 2013-04-30 03:56:58 +00:00
parent 8fddb1361b
commit c7937f6736
3 changed files with 27 additions and 1 deletions

1
.gitattributes vendored
View File

@ -10373,6 +10373,7 @@ tests/test/cg/ttryfin1.pp svneol=native#text/plain
tests/test/cg/ttryfin2.pp svneol=native#text/plain
tests/test/cg/ttryfin3.pp svneol=native#text/plain
tests/test/cg/ttryfin4.pp svneol=native#text/plain
tests/test/cg/ttryfin5.pp svneol=native#text/plain
tests/test/cg/tumin.pp svneol=native#text/plain
tests/test/cg/tvec.pp svneol=native#text/plain
tests/test/cg/uprintf3.pp svneol=native#text/plain

View File

@ -427,7 +427,7 @@ procedure tx64tryexceptnode.pass_generate_code;
location_reset(location,LOC_VOID,OS_NO);
oldflowcontrol:=flowcontrol;
flowcontrol:=[fc_inflowcontrol];
flowcontrol:=flowcontrol*[fc_unwind]+[fc_inflowcontrol];
{ this can be called recursivly }
oldBreakLabel:=nil;
oldContinueLabel:=nil;

25
tests/test/cg/ttryfin5.pp Normal file
View File

@ -0,0 +1,25 @@
{$mode objfpc}
var
counter: integer;
{ exit statement in try..except must not bypass finally code of outer try..finally }
procedure test;
begin
try
try
inc(counter);
exit;
except
end;
finally
inc(counter);
end;
end;
begin
counter:=0;
test;
if counter<>2 then
Halt(1);
end.