PR middle-end/77674
[official-gcc.git] / gcc / testsuite / gfortran.dg / fmt_t_3.f90
blob1ec67e118390f98cc5b2b6284948006ce4bf1a98
1 ! { dg-do run }
2 ! PR31051 bug with x and t format descriptors.
3 ! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org> from PR.
4 program t
5 integer, parameter :: n = 9
6 character(len=40) :: fmt
7 character(len=2), dimension(n) :: y
8 open(unit=10, status="scratch")
9 y = 'a '
10 fmt = '(a,1x,(t7, 3a))'
11 write(10, fmt) 'xxxx', (y(i), i = 1,n)
12 rewind(10)
13 read(10, '(a)') fmt
14 if (fmt.ne."xxxx a a a") call abort()
15 end program t