Commit 6c1400dd by Jerry DeLisle

re PR fortran/43265 (No EOF condition if reading with '(x)' from an empty file)

2010-03-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/43265
	* io/transfer.c (next_record_r): Only call hit_eof for specific
	conditions when an EOF is encountered.

From-SVN: r157810
parent fff4363b
2010-03-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/43265
* io/transfer.c (next_record_r): Only call hit_eof for specific
conditions when an EOF is encountered.
2010-03-29 Tobias Burnus <burnus@net-b.de>
PR fortran/43551
......
......@@ -2848,9 +2848,14 @@ next_record_r (st_parameter_dt *dtp, int done)
{
if (errno != 0)
generate_error (&dtp->common, LIBERROR_OS, NULL);
else if (dtp->u.p.item_count == 1
|| dtp->u.p.pending_spaces == 0)
hit_eof (dtp);
else
{
if (is_stream_io (dtp)
|| dtp->u.p.current_unit->pad_status == PAD_NO
|| dtp->u.p.current_unit->bytes_left
== dtp->u.p.current_unit->recl)
hit_eof (dtp);
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment