gcc/testsuite/gfortran.dg/pr19928-1.f90
raw| 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') STOP 1 |
| 11 | end program main |