blob: 918ca8af162eb4ac855c0c7fd6afa413ad822dea [file] [log] [blame]
! { dg-do compile }
! PR93340 - test error handling of substring simplification
subroutine p
integer,parameter :: k = len ('a'(:0))
integer,parameter :: m = len ('a'(0:)) ! { dg-error "Substring start index" }
call foo ('bcd'(-8:-9))
call foo ('bcd'(-9:-8)) ! { dg-error "Substring start index" }
call foo ('bcd'(:12)) ! { dg-error "Substring end index" }
call foo ('bcd'(-12:)) ! { dg-error "Substring start index" }
end