summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-02 18:31:07 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-02 18:31:07 +0000
commit962a2a635d88e8e642e9e7ba293637b8c230962e (patch)
treefef71634d1b212360a95fc2f6d138dc350b98908
parent39992b0e23491db2b67bd0999dd88d875938fa32 (diff)
downloadgcc-962a2a635d88e8e642e9e7ba293637b8c230962e.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150356 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/list_read.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index e8efb647c4b..846bdfb1738 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 c39a51d34e2..bcc00e17c26 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. */