summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-06 21:44:56 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-06 21:44:56 +0000
commit3c0d801cdcce83e1739c42de0e26106281a61df9 (patch)
treea4bb1c0be4d5153898c2f02a7677e835473d9781 /libgfortran
parent7b919065100b9d5597126afce413f6caa6277704 (diff)
downloadgcc-3c0d801cdcce83e1739c42de0e26106281a61df9.tar.gz
2010-02-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 156556 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@156557 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/transfer.c15
2 files changed, 20 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index c77b018e8dd..be54763e96f 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran
+ * io/transfer.c (read_sf): Handle EOR and EOF conditions for
+ ADVANCE="no" with PAD="yes" or PAD="no".
+
2010-02-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42901
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index a110c6529ff..e627a1c7590 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -305,7 +305,20 @@ read_sf (st_parameter_dt *dtp, int * length, int no_error)
if (lorig > *length && !dtp->u.p.sf_seen_eor && !seen_comma)
{
if (n > 0 || no_error)
- dtp->u.p.at_eof = 1;
+ {
+ if (dtp->u.p.advance_status == ADVANCE_NO)
+ {
+ if (dtp->u.p.current_unit->pad_status == PAD_NO)
+ {
+ hit_eof (dtp);
+ return NULL;
+ }
+ else
+ dtp->u.p.eor_condition = 1;
+ }
+ else
+ dtp->u.p.at_eof = 1;
+ }
else
{
hit_eof (dtp);