namelist_50.f90: New test.
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 28 Jun 2008 23:11:53 +0000 (23:11 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 28 Jun 2008 23:11:53 +0000 (23:11 +0000)
2008-06-28  Jerry DeLisle <jvdelisle@gcc.gnu.org>

* gfortran.dg/namelist_50.f90: New test.

From-SVN: r137239

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

index b56104c323843fb80344087a93efa53d8c2aa92c..c78a7caf591e21f3c06bb8c68212d3c6957fd2e6 100644 (file)
@@ -1,3 +1,7 @@
+2008-06-28  Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+       * gfortran.dg/namelist_50.f90: New test.
+
 2008-06-28  Joseph Myers  <joseph@codesourcery.com>
 
        * gcc.c-torture/compile/20080628-1.c: New test.
diff --git a/gcc/testsuite/gfortran.dg/namelist_50.f90 b/gcc/testsuite/gfortran.dg/namelist_50.f90
new file mode 100644 (file)
index 0000000..57e93fc
--- /dev/null
@@ -0,0 +1,16 @@
+! { dg-do run }
+! PR36657 Namelist string constant immediately followed by comment
+program gfcbug79
+  implicit none
+  integer, parameter :: nnml = 10
+  character(len=8)  :: model = ""
+  namelist /NML/       model
+  open (nnml, status="scratch")
+  write(nnml,*) "&nml! This is a just comment"
+  write(nnml,*) "  model='foo'! This is a just comment"
+  write(nnml,*) "/"
+  rewind(nnml)
+  read (nnml, nml=NML)
+  if (model /= 'foo') call abort
+  close(nnml)
+end program gfcbug79