aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/namelist_73.f90
blob: 8fc88aa1ed922c372419ba909d38d549755ff1b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
! { dg-do run }
!
! PR fortran/50109
!
! Contributed by Jim Hanson
!
      program namelist_test

      integer nfp
      namelist /indata/ nfp

      nfp = 99
      open(unit=4, status='scratch')
      write(4,'(a)') '$indata'
      write(4,'(a)') 'NFP = 5,'
      write(4,'(a)') "!  "
      write(4,'(a)') "! "
      write(4,'(a)') "!  "
      write(4,'(a)') '/'

      rewind(4)
      read (4,nml=indata)
      close(4)

!      write(*,*) nfp
      if (nfp /= 5) call abort()

      end