hppa64: Fix fmt_f_default_field_width_3.f90 and fmt_g_default_field_width_3.f90
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_82.f90
bloba660e99f0d3b51e6540b7def1068628fb4d146f0
1 ! { dg-do run }
2 ! PR56660 Fails to read NAMELIST with certain form array syntax
3 type ptracer
4 character(len = 2) :: sname
5 logical :: lini
6 end type ptracer
8 type(ptracer) , dimension(3) :: tracer
9 namelist/naml1/ tracer
11 tracer(:) = ptracer('XXX', .false.)
13 open (99, file='nml_82.dat', status="replace")
14 write(99,*) "&naml1"
15 !write(99,*) " tracer(2) = 'bb' , .true."
16 write(99,*) " tracer(:) = 'aa' , .true."
17 write(99,*) " tracer(2) = 'bb' , .true."
18 write(99,*) "/"
19 rewind(99)
21 read (99, nml=naml1)
22 close (99, status="delete")
24 if (tracer(1)%sname.ne.'aa') STOP 1
25 if (.not.tracer(1)%lini) STOP 2
26 if (tracer(2)%sname.ne.'bb') STOP 3
27 if (.not.tracer(2)%lini) STOP 4
28 if (tracer(3)%sname.ne.'XX') STOP 5
29 if (tracer(3)%lini) STOP 6
31 !write (*, nml=naml1)
33 end