diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2019-01-12 23:06:47 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2019-01-12 23:06:47 +0000 |
commit | 9443a1859f961e4cfcc06be1d3118f417e68a463 (patch) | |
tree | c57a428f365dd73f5590a3c133fa6ed88c765b50 | |
parent | efb56ae82bd871b64861e991466ce616688a88e9 (diff) | |
download | gcc-9443a1859f961e4cfcc06be1d3118f417e68a463.zip gcc-9443a1859f961e4cfcc06be1d3118f417e68a463.tar.gz gcc-9443a1859f961e4cfcc06be1d3118f417e68a463.tar.bz2 |
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
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e4a1c11..f63e378 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +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> * ISO_Fortran_binding.h : New file. diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 4a7ccb3..d9af255 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. */ |