summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/unlimited_fmt_1.f08
blob: 5089d32ff4d7937fc6466db2609bbae0a6c5ceb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do run }
! PR41075 Implement unlimited format item '*'.
! Contributed by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
program unlimited
   implicit none
   integer i
   character(len=60) :: string
   integer, parameter :: n = 10
   integer, dimension(n) :: iarray
   iarray = (/ (i,i=1,n) /)
   do i=1,10
     write( string, '( "iarray =", *(g0, :, ","))') &
     & "abcdefg",iarray, i,"jklmnop"
   end do
   if (string.ne."iarray =abcdefg,1,2,3,4,5,6,7,8,9,10,10,jklmnop") &
   & call abort
end program unlimited