]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/71404 (416.gamess in SPEC CPU 2006 failed to build)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 5 Jun 2016 19:49:59 +0000 (19:49 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 5 Jun 2016 19:49:59 +0000 (19:49 +0000)
2016-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/71404
* io.c (match_io): For READ, commit in pending symbols in the
current statement before trying to match an expression so that
if the match fails and we undo symbols we dont toss good symbols.

From-SVN: r237108

gcc/fortran/ChangeLog
gcc/fortran/io.c

index e6edc16ff19fca1cf23c8c6df02a30dcc01345dd..b2354e7c2030091c06ff65b4228b5f1fa7d6b02b 100644 (file)
@@ -1,3 +1,10 @@
+2016-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/71404
+       * io.c (match_io): For READ, commit in pending symbols in the
+       current statement before trying to match an expression so that
+       if the match fails and we undo symbols we dont toss good symbols.
+
 2016-06-05  Andre Vehreschild  <vehre@gcc.gnu.org>
 
        PR fortran/69659
index 204cce2e5656cecfc3cb88f9de919198669d11a8..d538d84503349675abc357a7a7a4a47a8139f7b7 100644 (file)
@@ -3772,6 +3772,9 @@ match_io (io_kind k)
            }
          if (k == M_READ)
            {
+             /* Commit any pending symbols now so that when we undo
+                symbols later we wont lose them.  */
+             gfc_commit_symbols ();
              /* Reset current locus to get the initial '(' in an expression.  */
              gfc_current_locus = where;
              dt->format_expr = NULL;