[Bug libfortran/49791] [4.4/4.5/4.6/4.7 Regression] Formatted namelist reads fails with: Cannot match namelist object

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 28 05:48:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49791

--- Comment #18 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-28 05:47:39 UTC ---
The issue of the original report (comment 0) is now fixed for GCC 4.4 to the
trunk (4.7): The vendor extension extended array read of normal arrays in
namelists works again.

However, the following program still fails. It uses the same vendor extension
but for array components of derived types. The program works with gfortran
(before the 2010-10-xx commits), g95, sunf95, openf90, pathf95, pgf90 and
crayftn. It does not work with ifort.

TODO: Either one allows this test case (cf. comment 13) - or one decides that
that part (extended array read for derived-type components) of the vendor
extension won't be support anymore and updates the manual.


! { dg-do run }
!
!  PR fortran/49791
!
type t
  integer :: array(4)
end type t

type(t) :: a
namelist /nml/a

a%array = [ 1,2,3,4]
open(999, status='scratch')
write(999,'(a)') '&nml a%array(1) = 99, 192 /'
rewind(999)
read(999, nml=nml)
if (any (a%array /= [ 99, 192, 3, 4])) call abort ()
!write(*,nml=nml)
end



More information about the Gcc-bugs mailing list