1 ! RUN: %S/test_modfile.sh %s %t %flang_fc1
3 ! Test resolution of type-bound generics.
8 procedure
, pass(x
) :: add1
=> add
9 procedure
, nopass
:: add2
=> add
11 generic
:: g
=> add1
, add2
, add_real
14 integer(8) pure
function add(x
, y
)
15 class(t
), intent(in
) :: x
, y
17 integer(8) pure
function add_real(x
, y
)
18 class(t
), intent(in
) :: x
21 subroutine test1(x
, y
, z
)
25 subroutine test1p(x
, y
, z
)
29 subroutine test2(x
, y
, z
)
33 subroutine test2p(x
, y
, z
)
37 subroutine test3(x
, y
, z
)
41 subroutine test3p(x
, y
, z
)
45 subroutine test4(x
, y
, z
)
50 subroutine test4p(x
, y
, z
)
61 ! procedure, pass(x) :: add1 => add
62 ! procedure, nopass :: add2 => add
63 ! procedure :: add_real
64 ! generic :: g => add1
65 ! generic :: g => add2
66 ! generic :: g => add_real
69 ! pure function add(x, y)
70 ! class(t), intent(in) :: x
71 ! class(t), intent(in) :: y
74 ! pure function add_real(x, y)
75 ! class(t), intent(in) :: x
76 ! real(4), intent(in) :: y
77 ! integer(8) :: add_real
79 ! subroutine test1(x, y, z)
82 ! real(4) :: z(1_8:add(x, y))
84 ! subroutine test1p(x,y,z)
87 ! real(4)::z(1_8:x%add1(y))
89 ! subroutine test2(x, y, z)
92 ! real(4)::z(1_8:add(x,y))
94 ! subroutine test2p(x,y,z)
97 ! real(4) :: z(1_8:x%add1(y))
99 ! subroutine test3(x, y, z)
102 ! real(4)::z(1_8:add(y,x))
104 ! subroutine test3p(x,y,z)
107 ! real(4) :: z(1_8:x%add2(y, x))
109 ! subroutine test4(x, y, z)
112 ! real(4)::z(1_8:add_real(x,y))
114 ! subroutine test4p(x,y,z)
117 ! real(4) :: z(1_8:x%add_real(y))