2 ! Tests the check for PR31215, in which actual/formal interface
3 ! was not being correctly handled for the size of 'r' because
6 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
11 character(f(x)) function test2(x) result(r)
14 integer, intent(in) :: x
17 integer, intent(in) :: x
23 r(:)(i:i) = achar(mod(i,32)+iachar('@'))
32 if (len(test2(10)) .ne. 21) call abort ()
33 ! Check non-intrinsic calls are OK and check that fix does
34 ! not confuse result variables.
35 if (any (myfunc (test2(1)) .ne. "ABC")) call abort ()
37 function myfunc (ch) result (chr)
38 character (*) :: ch(:)
39 character(len(ch)) :: chr(4)
40 if (len (ch) .ne. 3) call abort ()
41 if (any (ch .ne. "ABC")) call abort ()
43 if (len(test2(len(chr))) .ne. 7) call abort ()
48 integer, intent(in) :: x
52 ! { dg-final { cleanup-modules "test1" } }