The specification in the main program of interface testv
is problematic: the compiler is complaining that testvdpn
cannot be resolved in the main program - and there is indeed nothing publicly accessible by that name. Further, testv
is already accessible through use association of the module testint_mod
in which it is defined. These three lines should be removed.
To answer the question asked later
Is overloading a function with selected_real_kind() not allowed?
If two procedures in a generic set are distinguished only by the kind type parameter of a real argument, then it doesn't matter should one (or more) come from a selected_real_kind
result. However, care should be taken that the kind parameters really are distinct. It may be, for example, that the selected_real_kind(14)
of the example returns the same kind as that of default real. This, and similar cases, would not be permitted. Although the compiler would surely moan.
Note also, for completeness, that for functions (rather than the subroutines of the question) disambiguation must be solely by the functions' arguments, not the results.