summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/data_char_5.f90
blob: ea26687e3d57d853ca3702335293e531ff299275 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
! PR fortran/99205 - Issues with non-constant character length 

subroutine sub ()
  integer :: ll = 4
  block
    character(ll) :: c(2) ! { dg-error "non-constant" }
    data c /'a', 'b'/
  end block
contains
  subroutine sub1 ()
    character(ll) :: d(2) ! { dg-error "non-constant" }
    data d /'a', 'b'/
  end subroutine sub1
end subroutine sub