aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/list_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/list_read.c')
-rw-r--r--libgfortran/io/list_read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 3ca63de82e9..ba310e1676d 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -2772,7 +2772,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. */