summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw3176.pp
blob: 57888ed679fdf6e350b924841227ed398e51e420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ Source provided for Free Pascal Bug Report 3176 }
{ Submitted by "Marcel Martin" on  2004-06-21 }
{ e-mail: mm10@ellipsa.net }
program test;
{$MODE OBJFPC}
{$GOTO ON}

label DONE1;
var i : Longint;
begin
  i := 0;
  try
    if i < 0 then goto DONE1;
    i := 1;

    //...

DONE1:
  finally
    i := 2;
  end;
  if i<>2 then
    halt(1);
end.
//DONE1:
//    begin end; <- inserting this line fixes the problem
//  finally