2 ! Various runtime tests of PROCEDURE declarations.
3 ! Contributed by Janus Weil <jaydub66@gmail.com>
10 subroutine csub() bind(c
)
14 integer, parameter :: ckind
= C_FLOAT_COMPLEX
16 function stub() bind(C
)
23 procedure(real), private
:: mp2
24 procedure(mfun
), public
:: mp3
25 procedure(csub
), public
, bind(c
) :: c
, d
26 procedure(csub
), public
, bind(c
, name
="myB") :: b
27 procedure(stub
), bind(C
) :: e
31 real function mfun(x
,y
)
43 procedure(a
), optional
:: b
48 character function abs_fun()
51 procedure(abs_fun
):: x
70 procedure(integer):: p1
72 procedure(abssub
):: p3
76 procedure(integer) :: p7
79 if (i
/= 5) call abort()
81 if (i
/= 3) call abort()
84 if (abs(r
-5.2)>1e-6) call abort()
86 if (abs(r
-3.7)>1e-6) call abort()
89 if (abs(r
-7.4)>1e-6) call abort()
91 if (i
/= -8) call abort()
93 if (abs(r
-2.1)>1e-6) call abort()
97 integer function fun(x
)
106 real function dummytest(dp
)
107 procedure(abssub
):: dp
117 integer function p1()
121 integer function p2(x
)