OSDN Git Service

2010-11-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Nov 2010 15:27:48 +0000 (15:27 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Nov 2010 15:27:48 +0000 (15:27 +0000)
PR libgfortran/43899
* gfortran.dg/namelist_67.f90: New test.

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

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

index c9ca8a3..325f82a 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/43899
+       * gfortran.dg/namelist_67.f90: New test.
+
 2010-11-03  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/46009
diff --git a/gcc/testsuite/gfortran.dg/namelist_67.f90 b/gcc/testsuite/gfortran.dg/namelist_67.f90
new file mode 100644 (file)
index 0000000..6adbd93
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do run }
+! { dg-options "-fbounds-check" }
+
+  character(35) :: nml_contents = "&NMLIST NML_STRING='123456789' /"
+  character(4)  :: nml_string
+  namelist /nmlist/ nml_string
+  nml_string = "abcd"
+  read(nml_contents,nml=nmlist)
+end program 
+! { dg-output "Fortran runtime warning: Namelist object 'nml_string' truncated on read." }