2 ! Testcase for PR 31203
3 ! We used to create strings with negative length
6 character(len
=i
) :: s(2)
7 if (len(s
) < 0) call abort
8 if (len(s
) /= max(i
,0)) call abort
12 integer, intent(in
) :: i
13 character(len
=i
) :: gee
19 character(len
=i
-j
) :: a
20 if (len(a
) < 0) call abort()
26 integer, intent(in
) :: i
27 character(len
=i
) :: gee
37 if (len(gee(2)) /= 2) call abort
38 if (len(gee(-5)) /= 0) call abort
39 if (len(gee(intfunc(3))) /= max(intfunc(3),0)) call abort
40 if (len(gee(intfunc(2))) /= max(intfunc(2),0)) call abort
42 if (len(bar(2)) /= 2) call abort
43 if (len(bar(-5)) /= 0) call abort
44 if (len(bar(intfunc(3))) /= max(intfunc(3),0)) call abort
45 if (len(bar(intfunc(2))) /= max(intfunc(2),0)) call abort
47 if (cow(bar(2)) /= 2) call abort
48 if (cow(bar(-5)) /= 0) call abort
49 if (cow(bar(intfunc(3))) /= max(intfunc(3),0)) call abort
50 if (cow(bar(intfunc(2))) /= max(intfunc(2),0)) call abort
55 integer, intent(in
) :: i
56 character(len
=i
) :: bar
62 character(len
=*), intent(in
) :: c
67 pure
function intfunc(i
)
68 integer, intent(in
) :: i