1! { dg-do compile }
2! PR93340 - test error handling of substring simplification
3
4subroutine p
5  integer,parameter :: k = len ('a'(:0))
6  integer,parameter :: m = len ('a'(0:)) ! { dg-error "Substring start index" }
7  call foo ('bcd'(-8:-9))
8  call foo ('bcd'(-9:-8)) ! { dg-error "Substring start index" }
9  call foo ('bcd'(:12))   ! { dg-error "Substring end index" }
10  call foo ('bcd'(-12:))  ! { dg-error "Substring start index" }
11end
12