From 2f4d643dab5cdf9ac795434578b970ca6af21021 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Thu, 11 Mar 2010 17:06:37 +0100 Subject: re PR fortran/43228 (NAMELIST I/O: Reading at 2 dimensions (rank) array values.) 2010-03-11 Tobias Burnus PR fortran/43228 * io/list_read.c (nml_parse_qualifier): Disable expanded_read for array sections. 2010-03-11 Tobias Burnus PR fortran/43228 * gfortran.dg/namelist_61.f90: New test. From-SVN: r157389 --- libgfortran/ChangeLog | 6 ++++++ libgfortran/io/list_read.c | 8 ++++++++ 2 files changed, 14 insertions(+) (limited to 'libgfortran') 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 + + PR fortran/43228 + * io/list_read.c (nml_parse_qualifier): Disable expanded_read + for array sections. + 2010-03-10 Jerry DeLisle 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])) -- cgit v1.1