aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gfortran.dg/pr19928-1.f90
blob: a8b04d8e5e4bc3176038a058fdc90297a5612435 (plain)
1
2
3
4
5
6
7
8
9
10
11
! PR 19928.  Check the use of constant substring indexes in a
! scalarization loop.
! { dg-do run }
program main
  implicit none
  character (len = 5), dimension (2) :: a
  character (len = 3), dimension (2) :: b
  a = (/ 'abcde', 'ghijk' /)
  b = a(:)(2:4)
  if (b(1) .ne. 'bcd' .or. b(2) .ne. 'hij') call abort
end program main