nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocatable_function_6.f90
blob8edb40acff9bd230bb8e861ae037ae0465f59384
1 ! { dg-do run }
3 ! PR fortran/56138
5 ! Contributed by John Chludzinski, using the code of John Reid
7 implicit none
8 CHARACTER(LEN=:),ALLOCATABLE :: str
9 if (s_to_c("ABCdef") /= "ABCdef" .or. len(s_to_c("ABCdef")) /= 6) STOP 1
10 str = s_to_c("ABCdef")
11 if (str /= "ABCdef" .or. len(str) /= 6) STOP 2
12 str(1:3) = s_to_c("123")
13 if (str /= "123def" .or. len(str) /= 6) STOP 3
15 contains
17 PURE FUNCTION s_to_c(string)
18 CHARACTER(LEN=*),INTENT(IN) :: string
19 CHARACTER(LEN=:),ALLOCATABLE :: s_to_c
20 s_to_c = string
21 ENDFUNCTION s_to_c
22 end