From: jvdelisle Date: Sat, 5 Jan 2008 16:00:40 +0000 (+0000) Subject: 2008-01-05 Jerry DeLisle X-Git-Tag: upstream/4.9.2~44311 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=883522c01bc52c8eb566f1a32fc00c10df16645f;p=platform%2Fupstream%2Flinaro-gcc.git 2008-01-05 Jerry DeLisle PR libfortran/34676 * io/list_read.c (next_char): Only save the EOF condition for later if advance="no". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131337 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 + + PR libfortran/34676 + * io/list_read.c (next_char): Only save the EOF condition for later if + advance="no". + 2008-01-03 Thomas Koenig 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;