summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/char_length_6.f90
blob: 1a8b2f106c3113d6996a9dd5c8d9039e07f5b4a7 (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 }
!
program test
  character(2_8) :: c(2)
  logical :: l(2)

  c = "aa"
  l = c .eq. "aa"
  if (any (.not. l)) call abort

  call foo ([c(1)])
  l = c .eq. "aa"
  if (any (.not. l)) call abort

contains

  subroutine foo (c)
    character(2) :: c(1)
  end subroutine foo

end