Browse Source

+ test to make sure any future fix of mantis #12508 takes this special
case into account

git-svn-id: trunk@12019 -

Jonas Maebe 17 years ago
parent
commit
7c919b3c74
2 changed files with 26 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 25 0
      tests/webtbs/tw12508a.pp

+ 1 - 0
.gitattributes

@@ -8605,6 +8605,7 @@ tests/webtbs/tw12249.pp svneol=native#text/plain
 tests/webtbs/tw1228.pp svneol=native#text/plain
 tests/webtbs/tw1229.pp svneol=native#text/plain
 tests/webtbs/tw1250.pp svneol=native#text/plain
+tests/webtbs/tw12508a.pp svneol=native#text/plain
 tests/webtbs/tw1251b.pp svneol=native#text/plain
 tests/webtbs/tw1255.pp svneol=native#text/plain
 tests/webtbs/tw1269.pp svneol=native#text/plain

+ 25 - 0
tests/webtbs/tw12508a.pp

@@ -0,0 +1,25 @@
+{ %norun }
+{ %opt=-Sew }
+
+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.