aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_5.f90
blob: ad7f1b05469065dbc2b30643e9bbc023276cb084 (plain)
1
2
3
4
5
6
7
8
9
10
! { dg-do compile }
!
! PR 36112
! Check correct bounds-checking behaviour for character-array-constructors.
! No need for -fbounds-check, enabled unconditionally.

  character(len=5) :: s = "hello"
  character(len=128) :: arr(3)
  arr = (/ "abc", "foo", s /) ! { dg-error "Different CHARACTER lengths" }
end