From ba286d56964f5232eac0b8e87780fd229c57b73c Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Sun, 2 Aug 2009 18:31:07 +0000 Subject: [PATCH] re PR fortran/40853 (I/O: Namelist read error) 2009-08-02 Jerry DeLisle 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 --- libgfortran/ChangeLog | 6 ++++++ libgfortran/io/list_read.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e8efb647c4b7..846bdfb17382 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2009-08-02 Jerry DeLisle + + 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 * 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 c39a51d34e23..bcc00e17c26f 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. */ -- 2.47.2