1 ! Test alternate entry points for functions when the result types
2 ! of all entry points match
5 integer, dimension (2, 2) :: a
, b
, f1
, e1
6 f1 (:, :) = 15 + a (1, 1)
9 e1 (:, :) = 42 + b (1, 1)
12 real, dimension (2, 2) :: f2
, e2
17 double precision, dimension (2, 2) :: a
, b
, f3
, e3
21 function f4 (a
) result (r
)
22 double precision, dimension (2, 2) :: a
, b
, r
, s
23 r (:, :) = 15 + a (1, 1)
25 entry e4 (b
) result (s
)
26 s (:, :) = 42 + b (1, 1)
28 function f5 () result (r
)
29 integer, dimension (2, 2) :: r
, s
30 entry e5 () result (s
)
33 function f6 () result (r
)
34 real, dimension (2, 2) :: r
, s
35 entry e6 () result (s
)
42 integer, dimension (2, 2) :: a
, f1
45 integer, dimension (2, 2) :: b
, e1
48 real, dimension (2, 2) :: f2
51 real, dimension (2, 2) :: e2
54 double precision, dimension (2, 2) :: f3
57 double precision, dimension (2, 2) :: e3
60 double precision, dimension (2, 2) :: a
, f4
63 double precision, dimension (2, 2) :: b
, e4
66 integer, dimension (2, 2) :: f5
69 integer, dimension (2, 2) :: e5
72 real, dimension (2, 2) :: f6
75 real, dimension (2, 2) :: e6
78 integer, dimension (2, 2) :: i
, j
79 real, dimension (2, 2) :: r
80 double precision, dimension (2, 2) :: d
, e
83 if (any (j
.ne
. 21)) call abort ()
87 if (any (j
.ne
. 49)) call abort ()
89 if (any (r
.ne
. 45)) call abort ()
91 if (any (r
.ne
. 45)) call abort ()
93 if (any (e
.ne
. 47)) call abort ()
95 if (any (e
.ne
. 47)) call abort ()
98 if (any (e
.ne
. 32)) call abort ()
100 if (any (e
.ne
. 59)) call abort ()
102 if (any (j
.ne
. 45)) call abort ()
104 if (any (j
.ne
. 45)) call abort ()
106 if (any (r
.ne
. 47)) call abort ()
108 if (any (r
.ne
. 47)) call abort ()