summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/der_array_io_3.f90
blob: f4746a1bb869e6054c97d1552750cb312a06c935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! Test IO of character arrays in derived types.
! { dg-do run }
! { dg-options "-std=legacy" }
!
program main
 character*1000 buf1, buf2
 type :: foo_type
     character(12), dimension(13) :: name = "hello world "
  end type foo_type
  type (foo_type) :: foo
!  foo = foo_type("hello world ")
  write (buf1,*)  foo
  write (buf2,*)  (foo%name(i), i=1,13)
  if (buf1.ne.buf2) STOP 1
end program main