aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2008-01-05 16:00:40 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2008-01-05 16:00:40 +0000
commitfa347f22327d1521dce3327fb1e6cc5d43d1b79d (patch)
treec0c3aa5e7e4d5729571fb4e4842155fc08f1409b /libgfortran
parent58fcda212fea0a129016917d3cc13063ffc7de68 (diff)
downloadgcc-fa347f22327d1521dce3327fb1e6cc5d43d1b79d.zip
gcc-fa347f22327d1521dce3327fb1e6cc5d43d1b79d.tar.gz
gcc-fa347f22327d1521dce3327fb1e6cc5d43d1b79d.tar.bz2
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')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/list_read.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index c15f5d5..2d276f6 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+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".
+
2008-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34565
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index f00fb77..f1d0e69 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;