PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / assumed_charlen_function_6.f90
blobed4f9dd053211521e022a26dcae9ecd69cf967d1
1 ! { dg-do compile }
3 ! PR fortran/41615
4 ! Output nicer error message for invalid assumed-len character function result
5 ! depending on what kind of contained procedure it is.
7 module funcs
8 implicit none
9 contains
10 function assumed_len(x) ! { dg-error "module procedure" }
11 character(*) assumed_len
12 integer, intent(in) :: x
13 end function assumed_len
14 end module funcs
16 module mod2
17 implicit none
18 contains
19 subroutine mysub ()
20 contains
21 function assumed_len(x) ! { dg-error "internal function" }
22 character(*) assumed_len
23 integer, intent(in) :: x
24 end function assumed_len
25 end subroutine
26 end module mod2
28 program main
29 implicit none
30 contains
31 function assumed_len(x) ! { dg-error "internal function" }
32 character(*) assumed_len
33 integer, intent(in) :: x
34 end function assumed_len
35 end program main