diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-01-05 16:00:40 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-01-05 16:00:40 +0000 |
commit | fa347f22327d1521dce3327fb1e6cc5d43d1b79d (patch) | |
tree | c0c3aa5e7e4d5729571fb4e4842155fc08f1409b /libgfortran/io | |
parent | 58fcda212fea0a129016917d3cc13063ffc7de68 (diff) | |
download | gcc-fa347f22327d1521dce3327fb1e6cc5d43d1b79d.tar.gz |
re PR fortran/34676 (IO error delayed)
2008-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/34676
* io/list_read.c (next_char): Only save the EOF condition for later if
advance="no".
From-SVN: r131337
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/list_read.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index f00fb77394b..f1d0e6961e1 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -236,10 +236,15 @@ next_char (st_parameter_dt *dtp) } if (length == 0) { - if (dtp->u.p.current_unit->endfile == AT_ENDFILE) + if (dtp->u.p.advance_status == ADVANCE_NO) + { + if (dtp->u.p.current_unit->endfile == AT_ENDFILE) + longjmp (*dtp->u.p.eof_jump, 1); + dtp->u.p.current_unit->endfile = AT_ENDFILE; + c = '\n'; + } + else longjmp (*dtp->u.p.eof_jump, 1); - dtp->u.p.current_unit->endfile = AT_ENDFILE; - c = '\n'; } else c = *p; |