aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/io.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2016-06-05 19:49:59 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2016-06-05 19:49:59 +0000
commitbc7209375650d3a237838a994383b3bab3d03647 (patch)
tree4e4fa1da7584d93342baeb26e92b3c931941c850 /gcc/fortran/io.c
parent7a66745357510da6a18759839e4d8fc4715166a0 (diff)
downloadgcc-bc7209375650d3a237838a994383b3bab3d03647.zip
gcc-bc7209375650d3a237838a994383b3bab3d03647.tar.gz
gcc-bc7209375650d3a237838a994383b3bab3d03647.tar.bz2
re PR fortran/71404 (416.gamess in SPEC CPU 2006 failed to build)
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
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r--gcc/fortran/io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 204cce2..d538d84 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -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;