1 ! Test alternate entry points for functions when the result types
2 ! of all entry points don't match
4 integer function f1 (a
)
12 complex function f2 (a
)
22 function f3 (a
) result (r
)
29 entry e3 (b
) result (s
)
32 entry g3 (b
) result (c
)
35 function f4 (a
) result (r
)
39 entry e4 (a
) result (s
)
40 entry g4 (a
) result (t
)
42 if (a
.eq
. 0) s
= 16 + a
43 if (a
.gt
. 0) t
= 17 + a
49 double precision e1
, g4
52 if (f1 (6) .ne
. 21) STOP 1
53 if (e1 (7) .ne
. 49) STOP 2
54 if (f2 (0) .ne
. 45) STOP 3
55 if (.not
. e2 (45)) STOP 4
57 if (f3 (17) .ne
. 32) STOP 6
58 if (.not
. e3 (42)) STOP 7
60 if (g3 (12) .ne
. 23) STOP 9
61 if (.not
. f4 (-5)) STOP 10
62 if (e4 (0) .ne
. 16) STOP 11
63 if (g4 (2) .ne
. 19) STOP 12