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