This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43228] NAMELIST I/O: Reading at 2 dimensions (rank) array values.



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]