2 ! Testcase for PR 31203
3 ! We used to create strings with negative length
6 character(len
=i
) :: s(2)
8 if (len(s
) /= max(i
,0)) STOP 2
12 integer, intent(in
) :: i
13 character(len
=i
) :: gee
19 character(len
=i
-j
) :: a
20 if (len(a
) < 0) STOP 1
26 integer, intent(in
) :: i
27 character(len
=i
) :: gee
37 if (len(gee(2)) /= 2) STOP 3
38 if (len(gee(-5)) /= 0) STOP 4
39 if (len(gee(intfunc(3))) /= max(intfunc(3),0)) STOP 5
40 if (len(gee(intfunc(2))) /= max(intfunc(2),0)) STOP 6
42 if (len(bar(2)) /= 2) STOP 7
43 if (len(bar(-5)) /= 0) STOP 8
44 if (len(bar(intfunc(3))) /= max(intfunc(3),0)) STOP 9
45 if (len(bar(intfunc(2))) /= max(intfunc(2),0)) STOP 10
47 if (cow(bar(2)) /= 2) STOP 11
48 if (cow(bar(-5)) /= 0) STOP 12
49 if (cow(bar(intfunc(3))) /= max(intfunc(3),0)) STOP 13
50 if (cow(bar(intfunc(2))) /= max(intfunc(2),0)) STOP 14
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