Commit 9443a185 by Jerry DeLisle

re PR libfortran/88776 (Namelist read from stdin: loss of data)

2019-01-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/88776
	* io/list_read.c (namelist_read): Use nml_err_ret path on read error
	not based on stdin_unit.

From-SVN: r267898
parent efb56ae8
2019-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/88776
* io/list_read.c (namelist_read): Use nml_err_ret path on read error
not based on stdin_unit.
2019-01-12 Paul Thomas <pault@gcc.gnu.org> 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
* ISO_Fortran_binding.h : New file. * ISO_Fortran_binding.h : New file.
......
...@@ -3614,11 +3614,7 @@ find_nml_name: ...@@ -3614,11 +3614,7 @@ find_nml_name:
while (!dtp->u.p.input_complete) while (!dtp->u.p.input_complete)
{ {
if (!nml_get_obj_data (dtp, &prev_nl, nml_err_msg, sizeof nml_err_msg)) if (!nml_get_obj_data (dtp, &prev_nl, nml_err_msg, sizeof nml_err_msg))
{ goto nml_err_ret;
if (dtp->u.p.current_unit->unit_number != options.stdin_unit)
goto nml_err_ret;
generate_error (&dtp->common, LIBERROR_READ_VALUE, nml_err_msg);
}
/* Reset the previous namelist pointer if we know we are not going /* Reset the previous namelist pointer if we know we are not going
to be doing multiple reads within a single namelist object. */ to be doing multiple reads within a single namelist object. */
......
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