Browse Source

--- Merging r18141 into '.':
U compiler/scandir.pas
--- Merging r18142 into '.':
A tests/webtbs/tw19864.pp

# revisions: 18141,18142
------------------------------------------------------------------------
r18141 | pierre | 2011-08-07 22:44:22 +0200 (Sun, 07 Aug 2011) | 1 line
Changed paths:
M /trunk/compiler/scandir.pas

Fix infinite loop in PUSH/POP directives
------------------------------------------------------------------------
------------------------------------------------------------------------
r18142 | pierre | 2011-08-07 22:44:55 +0200 (Sun, 07 Aug 2011) | 1 line
Changed paths:
A /trunk/tests/webtbs/tw19864.pp

Test fix of infinite loop in PUSH/POP directives
------------------------------------------------------------------------

git-svn-id: branches/fixes_2_6@20380 -

marco 13 years ago
parent
commit
2237f119d0
3 changed files with 35 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 2 0
      compiler/scandir.pas
  3. 32 0
      tests/webtbs/tw19864.pp

+ 1 - 0
.gitattributes

@@ -11797,6 +11797,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/tw19874.pp svneol=native#text/pascal
 tests/webtbs/tw1996.pp svneol=native#text/plain
 tests/webtbs/tw19960.pp svneol=native#text/pascal

+ 2 - 0
compiler/scandir.pas

@@ -946,7 +946,9 @@ unit scandir;
       recordpendinglocalfullswitch(switchesstatestack[switchesstatestackpos].localsw);
       recordpendingverbosityfullswitch(switchesstatestack[switchesstatestackpos].verbosity);
       pendingstate.nextmessagerecord:=switchesstatestack[switchesstatestackpos].pmessage;
+      { Reset verbosity and forget previous pmeesage }
       RestoreLocalVerbosity(nil);
+      current_settings.pmessage:=nil;
       flushpendingswitchesstate;
     end;
 

+ 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.