Allocatable vs pointer in procedure resolution

From: Rich Townsend (rhdt_at_barVOIDtol.udel.edu)
Date: 07/29/04


Date: Thu, 29 Jul 2004 09:59:51 -0400

Dear all,

I've come across a situation where I want two versions of a given
subroutine, one which works on pointer-style arrays, and the other which
works on allocatable arrays (via TR 15581).

I've tried putting these routines under the same generic interface, but
the Lahey compiler barfs on this, complaining that the signatures of the
two routines are too similar to disambiguate.

The problem, in essence, is whether it is possible to distinguish
between the signatures of, for instance,

real, dimension(:), pointer :: foo

and

real, dimension(:), allocatable :: foo

I would appreciate hearing:

1) What the F95 (+ TR15581) standard has to say about this -- do these
two dummy arguments have different signatures or not?

2) If not, can anyone envisage a reason why these two dummy arguments
*cannot* be considered to have different signatures?

3) What does the F03 standard have to say about this issue?

cheers,

Rich

-- 
Dr Richard H D Townsend
Bartol Research Institute
University of Delaware
[ Delete VOID for valid email address ]