diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2010-08-19 20:28:09 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2010-08-19 20:28:09 +0000 |
commit | e1721879798432788561c2dd7d8b8919ffa47b5d (patch) | |
tree | 750f195d634e16375f9de767be038cbd4fd1c65d /libgfortran | |
parent | 29e881429219040699b34e71c60a5a55e0fc12db (diff) | |
download | gcc-e1721879798432788561c2dd7d8b8919ffa47b5d.tar.gz |
re PR fortran/45108 (Namelist read: Not aborted when reading from STDIN)
2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/45108
* io/list_read.c (namelist_read): If namelist reading fails, use
generate_error and then continue the read loop.
From-SVN: r163387
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 14 |
2 files changed, 8 insertions, 12 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index b0a9c05ceb6..3ffb7888881 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libfortran/45108 + * io/list_read.c (namelist_read): If namelist reading fails, use + generate_error and then continue the read loop. + 2010-08-17 Jakub Jelinek <jakub@redhat.com> PR fortran/45308 diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index c88edf69cb4..d757b1c4826 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -2959,21 +2959,11 @@ find_nml_name: if (nml_get_obj_data (dtp, &prev_nl, nml_err_msg, sizeof nml_err_msg) == FAILURE) { - gfc_unit *u; - if (dtp->u.p.current_unit->unit_number != options.stdin_unit) goto nml_err_ret; - - u = find_unit (options.stderr_unit); - st_printf ("%s\n", nml_err_msg); - if (u != NULL) - { - sflush (u->s); - unlock_unit (u); - } + generate_error (&dtp->common, LIBERROR_READ_VALUE, nml_err_msg); } - - } + } dtp->u.p.eof_jump = NULL; free_saved (dtp); |