2 ! { dg-additional-options "-fcheck=all" }
3 ! { dg-shouldfail "Substring out of bounds" }
7 ! Co-contributed by G. Steinmetz
9 use iso_c_binding
, only
: c_char
10 call s(c_char_
'x', -2, -2)
12 subroutine s(x
,m
,n
) bind(c
)
13 use iso_c_binding
, only
: c_char
14 character(kind
=c_char
), value
:: x
17 subroutine foo(str
, m
, n
)
18 character(len
=*) :: str
21 ! { dg-output "Fortran runtime error: Substring out of bounds: lower bound .-2. of 'x' is less than one" }