1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
2 ! Test resolution of type-bound generics.
7 procedure
, pass(x
) :: add1
=> add
8 procedure
, nopass
:: add2
=> add
10 generic
:: g
=> add1
, add2
, add_real
13 integer(8) pure
function add(x
, y
)
14 class(t
), intent(in
) :: x
, y
16 integer(8) pure
function add_real(x
, y
)
17 class(t
), intent(in
) :: x
20 subroutine test1(x
, y
, z
)
24 subroutine test1p(x
, y
, z
)
28 subroutine test2(x
, y
, z
)
32 subroutine test2p(x
, y
, z
)
36 subroutine test3(x
, y
, z
)
40 subroutine test3p(x
, y
, z
)
44 subroutine test4(x
, y
, z
)
49 subroutine test4p(x
, y
, z
)
60 ! procedure, pass(x) :: add1 => add
61 ! procedure, nopass :: add2 => add
62 ! procedure :: add_real
63 ! generic :: g => add1
64 ! generic :: g => add2
65 ! generic :: g => add_real
68 ! pure function add(x, y)
69 ! class(t), intent(in) :: x
70 ! class(t), intent(in) :: y
73 ! pure function add_real(x, y)
74 ! class(t), intent(in) :: x
75 ! real(4), intent(in) :: y
76 ! integer(8) :: add_real
78 ! subroutine test1(x, y, z)
81 ! real(4) :: z(1_8:add(x, y))
83 ! subroutine test1p(x,y,z)
86 ! real(4)::z(1_8:x%add1(y))
88 ! subroutine test2(x, y, z)
91 ! real(4)::z(1_8:add(x,y))
93 ! subroutine test2p(x,y,z)
96 ! real(4) :: z(1_8:x%add1(y))
98 ! subroutine test3(x, y, z)
101 ! real(4)::z(1_8:add(y,x))
103 ! subroutine test3p(x,y,z)
106 ! real(4) :: z(1_8:x%add2(y, x))
108 ! subroutine test4(x, y, z)
111 ! real(4)::z(1_8:add_real(x,y))
113 ! subroutine test4p(x,y,z)
116 ! real(4) :: z(1_8:x%add_real(y))