2 ! Various runtime tests of PROCEDURE declarations.
3 ! Contributed by Janus Weil <jaydub66@gmail.com>
8 subroutine csub() bind(c
)
13 procedure(real), private
:: mp2
14 procedure(mfun
), public
:: mp3
15 procedure(csub
), public
, bind(c
) :: c
, d
16 procedure(csub
), public
, bind(c
, name
="myB") :: b
20 real function mfun(x
,y
)
32 procedure(a
), optional
:: b
50 procedure(integer):: p1
52 procedure(abssub
):: p3
56 procedure(integer) :: p7
59 if (i
/= 5) call abort()
61 if (i
/= 3) call abort()
64 if (abs(r
-5.2)>1e-6) call abort()
66 if (abs(r
-3.7)>1e-6) call abort()
69 if (abs(r
-7.4)>1e-6) call abort()
71 if (i
/= -8) call abort()
73 if (abs(r
-2.1)>1e-6) call abort()
77 integer function fun(x
)
86 real function dummytest(dp
)
87 procedure(abssub
):: dp
101 integer function p2(x
)
107 real,intent(inout
):: x
112 real,intent(inout
):: x
120 real,intent(inout
):: x