Browse Source

Test fix of infinite loop in PUSH/POP directives

git-svn-id: trunk@18142 -
pierre 14 years ago
parent
commit
7b5196a4bc
2 changed files with 33 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 32 0
      tests/webtbs/tw19864.pp

+ 1 - 0
.gitattributes

@@ -11707,6 +11707,7 @@ tests/webtbs/tw1950.pp svneol=native#text/plain
 tests/webtbs/tw19548.pp svneol=native#text/pascal
 tests/webtbs/tw1964.pp svneol=native#text/plain
 tests/webtbs/tw19700.pp svneol=native#text/plain
+tests/webtbs/tw19864.pp svneol=native#text/pascal
 tests/webtbs/tw1996.pp svneol=native#text/plain
 tests/webtbs/tw2001.pp svneol=native#text/plain
 tests/webtbs/tw2002.pp svneol=native#text/plain

+ 32 - 0
tests/webtbs/tw19864.pp

@@ -0,0 +1,32 @@
+{ %NORUN }
+unit tw19864;
+
+{$mode objfpc}
+
+interface
+
+implementation
+
+procedure testfun;
+begin
+  {$WARN SYMBOL_PLATFORM OFF}
+  {$WARN SYMBOL_PLATFORM ON}
+  {$PUSH}{$R-,Q-}
+  {$POP}
+  {$PUSH}{$R-,Q-}
+  {$POP}
+end;
+  {$WARN SYMBOL_PLATFORM OFF}
+var
+  test1 : longint platform;
+  {$WARN SYMBOL_PLATFORM ON}
+
+var
+  test2 : longint platform;
+
+begin
+  {$WARN SYMBOL_PLATFORM OFF}
+  test2:=2;
+  {$WARN SYMBOL_PLATFORM ON}
+  test1:=1;
+end.