PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr50069_2.f90
bloba5046d47630ddce9db5619b0566d4d9034f3a118
1 ! { dg-do compile }
3 function reverse(string)
4 implicit none
5 character(len=*), intent(in) :: string
6 character(len=:),allocatable :: reverse
7 integer i
8 reverse = string
9 forall (i=1:len(reverse)) reverse(i:i) = &
10 reverse(len(reverse)-i+1:len(reverse)-i+1)
11 end function reverse