summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/namelist_65.f90
blob: 6ef8ca493a51243dcb55d6eb5cf2d1849fe612a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
! { dg-do run }
! { dg-options "-std=gnu" }
! PR45710 Adjust format/padding for WRITE of NAMELIST group to internal file
program oneline
real :: a=1,b=2,c=3,d=4
namelist /nl1/ a,b,c
parameter(ilines=5)
character(len=80) :: out(ilines)

! fill array out with @
do i=1,len(out)
   out(:)(i:i)='@'
enddo

write(out,nl1)
if (out(1).ne."&NL1") call abort
if (out(2).ne." A=  1.0000000    ,") call abort
if (out(3).ne." B=  2.0000000    ,") call abort
if (out(4).ne." C=  3.0000000    ,") call abort
if (out(5).ne." /") call abort

end program oneline