2 ! Tests the fix for PR33998, in which the chain of expressions
3 ! determining the character length of my_string were not being
4 ! resolved by the formal to actual mapping.
6 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
13 real, intent(in) :: x(:)
14 character(0) h4(1:minval([(i,i=30,32), 15]))
15 character(0) sv1(size(x,1):size(h4))
16 character(0) sv2(2*lbound(sv1,1):size(h4))
17 character(lbound(sv2,1)-3) my_string
19 do i = 1, len(my_string)
20 my_string(i:i) = achar(modulo(i-1,10)+iachar('0'))
22 end function my_string
30 if (my_string(x) .ne. "01234567890") call abort ()
32 ! { dg-final { cleanup-modules "test" } }