diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2009-08-02 18:31:07 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2009-08-02 18:31:07 +0000 |
commit | ba286d56964f5232eac0b8e87780fd229c57b73c (patch) | |
tree | fef71634d1b212360a95fc2f6d138dc350b98908 /libgfortran | |
parent | 0589e07db3092a8f3788581f47d0c94c51fb4e79 (diff) | |
download | gcc-ba286d56964f5232eac0b8e87780fd229c57b73c.zip gcc-ba286d56964f5232eac0b8e87780fd229c57b73c.tar.gz gcc-ba286d56964f5232eac0b8e87780fd229c57b73c.tar.bz2 |
re PR fortran/40853 (I/O: Namelist read error)
2009-08-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40853
* io/list_read.c (nml_get_obj_data): Do not set nl
pointer to first_nl if nl->next is NULL.
From-SVN: r150356
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e8efb64..846bdfb 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2009-08-02 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libfortran/40853 + * io/list_read.c (nml_get_obj_data): Do not set nl + pointer to first_nl if nl->next is NULL. + 2009-07-31 Kaz Kojima <kkojima@gcc.gnu.org> * Makefile.am: Don't set SECTION_FLAGS with @SECTION_FLAGS@. diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index c39a51d..bcc00e1 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -2773,7 +2773,7 @@ get_name: if (nl->type == GFC_DTYPE_DERIVED) nml_touch_nodes (nl); - if (component_flag && nl->var_rank > 0) + if (component_flag && nl->var_rank > 0 && nl->next) nl = first_nl; /* Make sure no extraneous qualifiers are there. */ |