2 ! Tests the fix for PR36433 in which a check for the array size
3 ! or character length of the actual arguments of foo and bar
4 ! would reject this legal code.
6 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
10 function proc4 (arg
, chr
)
11 integer, dimension(10) :: proc4
12 integer, intent(in
) :: arg
13 character(8), intent(inout
) :: chr
18 character(8) :: chr_proc
27 function proc_ext (arg
, chr
)
28 integer, dimension(10) :: proc_ext
29 integer, intent(in
) :: arg
30 character(8), intent(inout
) :: chr
33 ! Check the passing of a module function
35 if (trim (chr
) .ne
. "proc4") call abort
36 ! Check the passing of an external function
37 call foo (proc_ext
, chr
)
38 ! Check the passing of a character function
39 if (trim (chr
) .ne
. "proc_ext") call abort
42 subroutine foo (p
, chr
)
43 character(8), intent(inout
) :: chr
47 integer, dimension(10) :: p
48 integer, intent(in
) :: arg
49 character(8), intent(inout
) :: chr
53 if (any(i
.ne
. 99)) call abort
61 if (p () .ne
. "chr_proc") call abort
65 function proc_ext (arg
, chr
)
66 integer, dimension(10) :: proc_ext
67 integer, intent(in
) :: arg
68 character(8), intent(inout
) :: chr
72 ! { dg-final { cleanup-modules "m" } }