summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr18210.f90
blob: 253f2919816ad97ab20463be43a4aa03747b5e3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do run { target fd_truncate } }
! Names in upper case and object names starting column 2
! Based on example provided by thomas.koenig@online.de

program pr18210

  real :: a
  character*80 :: buffer
  namelist /foo/ a

  a = 1.4
  open (10, status = "scratch")
  write (10,foo)
  rewind (10)
  read (10, '(a)') buffer
  if (buffer(2:4) /= "FOO") call abort ()
  read (10, '(a)') buffer
  if (buffer(1:2) /= " A") call abort ()
  close (10)

end program pr18210