view gcc/testsuite/gfortran.dg/parameter_array_format.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { 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