Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/assumed_charlen_function_6.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 ! { dg-do compile } | |
2 | |
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. | |
6 | |
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 | |
15 | |
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 | |
27 | |
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 |