summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw12508a.pp
blob: 8109c9bdd50335a4b06fe7dbd03cae6b2d1e3f2d (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
{ %norun }
{ %opt=-Sew -vw }

procedure test(a: longint);
var
  i: longint;
begin
  i:=1;
  if (a < 0) then
    begin
      for i := 1 to 2 do
        writeln(i);
    end
  else
    begin
      { the for-loop in the then-branch must not mark i in this block
        as "uninitialised"
      }
      if i > 0 then
        writeln(i);
    end;
end;

begin
end.