aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/bounds_check_array_ctor_3.f90
blob: 5e566ba9bc9e5df3957ea7f10bfbd377065418bb (plain)
1
2
3
4
5
6
7
8
9
! { dg-do compile }
!
! PR 36112
! Check correct bounds-checking behaviour for character-array-constructors.
! This should not need any -fbounds-check and is enabled all the time.

  character(len=128) :: arr(2) = (/ "abc", "foobar" /) ! { dg-error "Different CHARACTER lengths" }
  arr = (/ "abc", "foobar" /) ! { dg-error "Different CHARACTER lengths" }
end