This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/37707] Namelist read of array of derived type incorrect
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2008 02:40:36 -0000
- Subject: [Bug libfortran/37707] Namelist read of array of derived type incorrect
- References: <bug-37707-109@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2008-10-09 02:40 -------
The following simple patch fixes this. I will commit under the obvious and
simple rule. (Obvious once you spend several hours studying it to see what is
going wrong!)
Index: io/list_read.c
===================================================================
--- io/list_read.c (revision 140900)
+++ io/list_read.c (working copy)
@@ -2839,6 +2839,9 @@ get_name:
goto nml_err_ret;
}
+ if (first_nl != NULL && first_nl->var_rank > 0)
+ nl = first_nl;
+
if (nml_read_obj (dtp, nl, 0, pprev_nl, nml_err_msg, nml_err_msg_size,
clow, chigh) == FAILURE)
goto nml_err_ret;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37707