From 7c919b3c744cc1f4723cf26eee028a521c003be8 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 2 Nov 2008 14:23:55 +0000 Subject: [PATCH] + test to make sure any future fix of mantis #12508 takes this special case into account git-svn-id: trunk@12019 - --- .gitattributes | 1 + tests/webtbs/tw12508a.pp | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tests/webtbs/tw12508a.pp diff --git a/.gitattributes b/.gitattributes index b669553b53..01e1d8e1ab 100644 --- a/.gitattributes +++ b/.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 diff --git a/tests/webtbs/tw12508a.pp b/tests/webtbs/tw12508a.pp new file mode 100644 index 0000000000..77304963c2 --- /dev/null +++ b/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.