mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 11:49:23 +02:00
* 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:
parent
8fddb1361b
commit
c7937f6736
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
25
tests/test/cg/ttryfin5.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user