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
This commit is contained in:
parent
ff0a0c1d88
commit
2f4d643dab
|
@ -1,3 +1,8 @@
|
|||
2010-03-11 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/43228
|
||||
* gfortran.dg/namelist_61.f90: New test.
|
||||
|
||||
2010-03-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/43255
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
! { dg-do run }
|
||||
!
|
||||
! PR fortran/43228
|
||||
!
|
||||
integer :: a(3,3)
|
||||
character(len=100) :: str
|
||||
namelist /nml/a
|
||||
|
||||
a = -1
|
||||
str = '&nml a(1,:) = 1 2 3 /'
|
||||
read(str, nml=nml)
|
||||
if (any (a(1,:) /= [1, 2, 3])) call abort ()
|
||||
if (any (a([2,3],:) /= -1)) call abort ()
|
||||
|
||||
a = -1
|
||||
str = '&nml a(1,1) = 1 2 3 4 /'
|
||||
read(str, nml=nml)
|
||||
if (any (a(:,1) /= [1, 2, 3])) call abort ()
|
||||
if (any (a(:,2) /= [4, -1, -1])) call abort ()
|
||||
if (any (a(:,3) /= -1)) call abort ()
|
||||
|
||||
str = '&nml a(1,:) = 1 2 3 , &
|
||||
& a(2,:) = 4,5,6 &
|
||||
& a(3,:) = 7 8 9/'
|
||||
read(str, nml=nml)
|
||||
if (any (a(1,:) /= [1, 2, 3])) call abort ()
|
||||
if (any (a(2,:) /= [4, 5, 6])) call abort ()
|
||||
if (any (a(3,:) /= [7, 8, 9])) call abort ()
|
||||
|
||||
!print *, a(:,1)
|
||||
!print *, a(:,2)
|
||||
!print *, a(:,3)
|
||||
end
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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]))
|
||||
|
|
Loading…
Reference in New Issue