aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2011-07-23 00:44:20 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2011-07-23 00:44:20 +0200
commitf5e62ce922eace0a9c8989c4f962d50005ad9d47 (patch)
tree707c19c9f69eb906591b98e127c3996e1450c8ad
parentefc694a70a411f4399c71c715afaa22b10edac75 (diff)
downloadgcc-f5e62ce922eace0a9c8989c4f962d50005ad9d47.zip
gcc-f5e62ce922eace0a9c8989c4f962d50005ad9d47.tar.gz
gcc-f5e62ce922eace0a9c8989c4f962d50005ad9d47.tar.bz2
re PR libfortran/49791 (Formatted namelist reads fails with: Cannot match namelist object)
2011-07-23 Tobias Burnus <burnus@net-b.de> PR fortran/49791 * io/list_read.c (nml_parse_qualifier): Remove check to enabled extended read for another case. 2011-07-23 Tobias Burnus <burnus@net-b.de> PR fortran/49791 * gfortran.dg/namelist_72.f: New. From-SVN: r176661
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_72.f33
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/list_read.c1
4 files changed, 44 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8eb2828..a364c72 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2011-07-23 Tobias Burnus <burnus@net-b.de>
+ PR fortran/49791
+ * gfortran.dg/namelist_72.f: New.
+
+2011-07-23 Tobias Burnus <burnus@net-b.de>
+
* gfortran.dg/coarray_25.f90: New.
2011-07-22 Ville Voutilainen <ville.voutilainen@gmail.com>
diff --git a/gcc/testsuite/gfortran.dg/namelist_72.f b/gcc/testsuite/gfortran.dg/namelist_72.f
new file mode 100644
index 0000000..22c0880
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_72.f
@@ -0,0 +1,33 @@
+! { dg-do run }
+!
+! PR fortran/49791
+!
+! Contributed by Elliott Sales de Andrade
+!
+ program namelist_test
+
+ dimension xpos(5000), ypos(5000)
+ namelist /geometry/ xpos, ypos
+
+ xpos = -huge(xpos)
+ ypos = -huge(ypos)
+
+ open(unit=4,file='geometry.in')
+ write(4,'(a)') '$geometry'
+ write(4,'(a)') ' xpos(1)= 0.00, 0.10, 0.20, 0.30, 0.40,'
+ write(4,'(a)') ' ypos(1)= 0.50, 0.60, 0.70, 0.80, 0.90,'
+ write(4,'(a)') '$end'
+
+ close(4)
+
+ open (unit=4,file='geometry.in',status='old',form='formatted')
+ read (4,geometry)
+ close(4, status='delete')
+
+ !print *, 'xpos', xpos(1:10), 'ypos', ypos(1:10)
+
+ if (any (xpos(1:5) /= [0.00, 0.10, 0.20, 0.30, 0.40]))call abort()
+ if (any (ypos(1:5) /= [0.50, 0.60, 0.70, 0.80, 0.90]))call abort()
+ if (any (xpos(6:) /= -huge(xpos))) call abort ()
+ if (any (ypos(6:) /= -huge(ypos))) call abort ()
+ end
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 4db1e20..76f5f99 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/49791
+ * io/list_read.c (nml_parse_qualifier): Remove check to
+ enabled extended read for another case.
+
2011-07-15 Daniel Carrera <dcarrera@gmail.com>
* caf/mpi.c (caf_runtime_error): Change fprintf to vfprintf.
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index c88f232..01272d0 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -2213,7 +2213,6 @@ nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad,
do not allow excess data to be processed. */
if (is_array_section == 1
|| !(compile_options.allow_std & GFC_STD_GNU)
- || !dtp->u.p.ionml->touched
|| dtp->u.p.ionml->type == BT_DERIVED)
ls[dim].end = ls[dim].start;
else