From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gfortran.dg/namelist_66.f90 | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/namelist_66.f90 (limited to 'gcc/testsuite/gfortran.dg/namelist_66.f90') diff --git a/gcc/testsuite/gfortran.dg/namelist_66.f90 b/gcc/testsuite/gfortran.dg/namelist_66.f90 new file mode 100644 index 000000000..912261b4d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/namelist_66.f90 @@ -0,0 +1,40 @@ +! { dg-do run } +! PR46010 Failure to read these two examples of namelists +type ptracer + character(len = 2) :: sname + logical :: lini +end type ptracer +type(ptracer) , dimension(3) :: tracer +namelist/naml1/ tracer + +type qptracer + character(len = 20) :: sname = ""!: short name + character(len = 45 ) :: lname = ""!: long name + character(len = 20 ) :: sunit = "" !: unit + logical :: lini !: read in a file or not + logical :: lsav !: ouput the tracer or not +end type qptracer +type(qptracer) , dimension(3) :: qtracer +namelist/naml2/ qtracer + +open (99, file='nml.dat', status="replace") +write(99,*) "&naml1" +write(99,*) " tracer(1) = 'aa', .true." +write(99,*) " tracer(2) = 'bb', .true." +write(99,*) " tracer(3) = 'cc', .true." +write(99,*) "/" +rewind(99) +read (99, nml=naml1) +write (*, nml=naml1) +rewind(99) +write(99,*) "&naml2 ! just some stuff" +write(99,*) " qtracer(1) = 'dic ' , 'dissolved inorganic concentration ', 'mol-c/l' , .true. , .true.," +write(99,*) " qtracer(2) = 'alkalini' , 'total alkalinity concentration ', 'eq/l ' , .true. , .true.," +write(99,*) "/" +rewind(99) +read (99, nml=naml2) +write (*, nml=naml2) +rewind(99) + +close (99, status="delete") +end -- cgit v1.2.3