From 23b1e6acf3cf91077c83d803423ddfb7f521aaaf Mon Sep 17 00:00:00 2001
From: Jerry DeLisle <jvdelisle@gcc.gnu.org>
Date: Sat, 28 Jun 2008 23:11:53 +0000
Subject: [PATCH] namelist_50.f90: New test.

2008-06-28  Jerry DeLisle <jvdelisle@gcc.gnu.org>

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

From-SVN: r137239
---
 gcc/testsuite/ChangeLog                   |  4 ++++
 gcc/testsuite/gfortran.dg/namelist_50.f90 | 16 ++++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 gcc/testsuite/gfortran.dg/namelist_50.f90

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b56104c32384..c78a7caf591e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 000000000000..57e93fcbf25b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_50.f90
@@ -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
-- 
GitLab