re PR fortran/31051 ([4.2 Only] gfortran bug with x and t format descriptors.)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 15 Mar 2007 01:30:05 +0000 (01:30 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 15 Mar 2007 01:30:05 +0000 (01:30 +0000)
2007-03-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/31051
* gfortran.dg/fmt_t_4.f90: New

From-SVN: r122942

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

index 47d977040397c0e66ed6ec04aa1b325034cd9e6a..991755e86d30b4e5d13935cb8725bb61ab39dee5 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/31051
+       * gfortran.dg/fmt_t_4.f90: New
+
 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        PR C++/31165
diff --git a/gcc/testsuite/gfortran.dg/fmt_t_3.f90 b/gcc/testsuite/gfortran.dg/fmt_t_3.f90
new file mode 100644 (file)
index 0000000..1ec67e1
--- /dev/null
@@ -0,0 +1,15 @@
+! { dg-do run }
+! PR31051 bug with x and t format descriptors.
+! Test case prepared by Jerry DeLisle  <jvdelisle@gcc.gnu.org> from PR.
+program t
+   integer, parameter :: n = 9
+   character(len=40) :: fmt
+   character(len=2), dimension(n) :: y
+   open(unit=10, status="scratch")
+   y = 'a '
+   fmt = '(a,1x,(t7, 3a))'
+   write(10, fmt) 'xxxx', (y(i), i = 1,n)
+   rewind(10)
+   read(10, '(a)') fmt
+   if (fmt.ne."xxxx  a a a") call abort()
+end program t