From 3423894f17cfdd78ebd2c0c1cc765c6f8a39fff1 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Tue, 14 Sep 2010 04:37:02 +0000 Subject: re PR fortran/45532 (gfortran namelist read error) 2010-09-14 Jerry DeLisle PR libfortran/45532 * io/list_read.c (nml_get_obj_data): Set first_nl if the previous is NULL. From-SVN: r164266 --- libgfortran/ChangeLog | 6 ++++++ libgfortran/io/list_read.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'libgfortran') diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index d690be1ec61..bd4243f0828 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2010-09-14 Jerry DeLisle + + PR libfortran/45532 + * io/list_read.c (nml_get_obj_data): Set first_nl if the previous + is NULL. + 2010-09-12 Francois-Xavier Coudert * intrinsics/pack_generic.c (pack): Add missing return and fix whitespace. diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index d757b1c4826..b3c1cf6a89d 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -2757,10 +2757,11 @@ get_name: goto nml_err_ret; } - if (!component_flag) + if (*pprev_nl == NULL || !component_flag) first_nl = nl; root_nl = nl; + component_flag = 1; c = next_char (dtp); -- cgit v1.2.1