PR libfortran

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".

From-SVN: r156540
This commit is contained in:
Jerry DeLisle 2010-02-06 14:39:51 +00:00
parent b761dbe6a1
commit 26bda00088
2 changed files with 20 additions and 1 deletions

View File

@ -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

View File

@ -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);