diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/fmt_t_4.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/fmt_t_4.f90 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/fmt_t_4.f90 b/gcc/testsuite/gfortran.dg/fmt_t_4.f90 new file mode 100644 index 000000000..6c96f7ba8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/fmt_t_4.f90 @@ -0,0 +1,18 @@ +! { dg-do run } +! PR31199, test case from PR report. + program write_write + character(len=20) :: a,b,c + open(10, status="scratch") + write (10,"(a,t1,a,a)") "xxxxxxxxx", "abc", "def" + write (10,"(a,t1,a)",advance='no') "xxxxxxxxx", "abc" + write (10,"(a)") "def" + write (10,"(a)") "abcdefxxx" + rewind(10) + read(10,*) a + read(10,*) b + read(10,*) c + close(10) + if (a.ne.b) call abort() + IF (b.ne.c) call abort() + end + |