summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/parameter_array_format.f90
blob: d4ae9dac8c94ffefc42c492059bac98fe37dd6dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! { dg-do  run }
! PR fortran/66709
! Check that parameter formats are handled correctly.
! Original test case by Gerhard Steinmetz.
program main
  character(len=2), dimension(9), parameter :: f = ['("','He','ll','lo',', ','wo','rl','d!','")']
  character(len=2), dimension(9) :: g = ['("','He','ll','lo',', ','wo','rl','d!','")']
  character (len=20) :: line
  write (unit=line,fmt=f)
  if (line /= "Helllo, world!") STOP 1
  line = " "
  write (unit=line,fmt=g)
  if (line /= "Helllo, world!") STOP 2
end program main