This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43228] NAMELIST I/O: Reading at 2 dimensions (rank) array values.
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Mar 2010 07:23:46 -0000
- Subject: [Bug fortran/43228] NAMELIST I/O: Reading at 2 dimensions (rank) array values.
- References: <bug-43228-18854@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from burnus at gcc dot gnu dot org 2010-03-11 07:23 -------
> Any other thoughts? (I am flexible and I am looking at the other idea of #10)
How about something like the following? Note: It does not quite work yet :-(
Index: list_read.c
===================================================================
--- list_read.c (Revision 157379)
+++ list_read.c
@@ -2081,6 +2081,15 @@
ls[dim].end = ls[dim].start;
else
dtp->u.p.expanded_read = 1;
+
+ if (is_array_section == 1 && dtp->u.p.expanded_read == 1)
+ {
+ int i;
+ dtp->u.p.expanded_read = 0;
+ for (i = 0; i < dim; i++)
+ if (ls[dim].end == NULL)
+ ls[i].end = ls[i].start;
+ }
}
/* Check for non-zero rank. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43228