From: Jerry DeLisle Date: Sat, 12 Jan 2019 23:06:47 +0000 (+0000) Subject: re PR libfortran/88776 (Namelist read from stdin: loss of data) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9443a1859f961e4cfcc06be1d3118f417e68a463;p=gcc.git re PR libfortran/88776 (Namelist read from stdin: loss of data) 2019-01-12 Jerry DeLisle 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 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e4a1c119751..f63e3782734 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2019-01-12 Jerry DeLisle + + 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 * ISO_Fortran_binding.h : New file. diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 4a7ccb3ddd5..d9af255a034 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -3614,11 +3614,7 @@ find_nml_name: while (!dtp->u.p.input_complete) { if (!nml_get_obj_data (dtp, &prev_nl, nml_err_msg, sizeof nml_err_msg)) - { - 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); - } + goto nml_err_ret; /* Reset the previous namelist pointer if we know we are not going to be doing multiple reads within a single namelist object. */