OSDN Git Service

2010-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Oct 2010 19:34:21 +0000 (19:34 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Oct 2010 19:34:21 +0000 (19:34 +0000)
PR libgfortran/46010
* gfortran.dg/namelist_66.f90: New test.
* gfortran.dg/fmt_t_6.f: Fix whitespace.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165981 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/fmt_t_6.f
gcc/testsuite/gfortran.dg/namelist_66.f90 [new file with mode: 0644]

index a00180a..cca9e74 100644 (file)
@@ -1,3 +1,9 @@
+2010-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/46010
+       * gfortran.dg/namelist_66.f90: New test.
+       * gfortran.dg/fmt_t_6.f: Fix whitespace.
+
 2010-10-26  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/template/arg8.C: Test for helpful diagnostic.
index 98ca172..04141a1 100644 (file)
@@ -1,4 +1,4 @@
-! { dg-do  run }
+! { dg-do run }
 ! PR34782 tab format failure to display properly (regression vs. g77)
       character a(6)
       character(22)  :: output
diff --git a/gcc/testsuite/gfortran.dg/namelist_66.f90 b/gcc/testsuite/gfortran.dg/namelist_66.f90
new file mode 100644 (file)
index 0000000..912261b
--- /dev/null
@@ -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