aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr51434.f90
blob: 31679ec5d78711382ecb8b5fae829a3e2d52ecd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do run }
! PR fortran/51434
module foo
   implicit none
   integer, parameter :: n = 5
   character(len=1), parameter :: s(n) = 'a'
   type :: a
      integer :: m = n
      character(len=1):: t(n) = transfer('abcde             ', s)
   end type a
end module foo

program bar
   use foo
   implicit none
   type(a) c
   if (c%m /= n) stop 1
   if (any(c%t /= ['a', 'b', 'c', 'd', 'e'])) stop 2
end program bar