aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2010-03-11 17:06:37 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2010-03-11 17:06:37 +0100
commit2f4d643dab5cdf9ac795434578b970ca6af21021 (patch)
tree8619eef5d631dc59aea8b9819cc1d86757f0be5d /libgfortran
parentff0a0c1d883427293cc007f273ad6f9a31b511a6 (diff)
downloadgcc-2f4d643dab5cdf9ac795434578b970ca6af21021.zip
gcc-2f4d643dab5cdf9ac795434578b970ca6af21021.tar.gz
gcc-2f4d643dab5cdf9ac795434578b970ca6af21021.tar.bz2
re PR fortran/43228 (NAMELIST I/O: Reading at 2 dimensions (rank) array values.)
2010-03-11 Tobias Burnus <burnus@net-b.de> PR fortran/43228 * io/list_read.c (nml_parse_qualifier): Disable expanded_read for array sections. 2010-03-11 Tobias Burnus <burnus@net-b.de> PR fortran/43228 * gfortran.dg/namelist_61.f90: New test. From-SVN: r157389
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/list_read.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index e496264..4f59525 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-11 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/43228
+ * io/list_read.c (nml_parse_qualifier): Disable expanded_read
+ for array sections.
+
2010-03-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/43320
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index afd5b45..830cde2 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -2091,6 +2091,14 @@ nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad,
}
}
+ 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++)
+ ls[i].end = ls[i].start;
+ }
+
/* Check the values of the triplet indices. */
if ((ls[dim].start > (ssize_t) GFC_DIMENSION_UBOUND(ad[dim]))
|| (ls[dim].start < (ssize_t) GFC_DIMENSION_LBOUND(ad[dim]))