From: Tobias Burnus Date: Thu, 28 Jul 2011 05:38:54 +0000 (+0200) Subject: backport: re PR libfortran/49791 (Formatted namelist reads fails with: Cannot match... X-Git-Tag: releases/gcc-4.4.7~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fe6f160692a7dfb682adbe3044ac305ec4a4f7c;p=thirdparty%2Fgcc.git backport: re PR libfortran/49791 (Formatted namelist reads fails with: Cannot match namelist object) 2011-07-28 Tobias Burnus Backport from mainline 2011-07-23 Tobias Burnus PR fortran/49791 * io/list_read.c (nml_parse_qualifier): Remove check to enabled extended read for another case. 2011-07-28 Tobias Burnus Backported from mainline 2011-07-23 Tobias Burnus PR fortran/49791 * gfortran.dg/namelist_72.f: New. From-SVN: r176857 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 13b73d7ad28c..2f0baf5443ce 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2011-07-28 Tobias Burnus + + Backported from mainline + 2011-07-23 Tobias Burnus + + PR fortran/49791 + * gfortran.dg/namelist_72.f: New. + 2011-07-27 Uros Bizjak * gcc.target/i386/avx-os-support.h: New. diff --git a/gcc/testsuite/gfortran.dg/namelist_72.f b/gcc/testsuite/gfortran.dg/namelist_72.f new file mode 100644 index 000000000000..22c088076168 --- /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 b3ec91eb705a..214d78c981bf 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,12 @@ +2011-07-28 Tobias Burnus + + Backport from mainline + 2011-07-23 Tobias Burnus + + PR fortran/49791 + * io/list_read.c (nml_parse_qualifier): Remove check to + enabled extended read for another case. + 2011-04-16 Release Manager * GCC 4.4.6 released. diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index e560f1209b92..d33eaa6fbea9 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -2079,7 +2079,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 == GFC_DTYPE_DERIVED) ls[dim].end = ls[dim].start; else