As the introduction of Fortran 2008 mentions:
- ALLOCATABLE and POINTER attributes are used in generic resolution.
- Procedureness of a dummy argument is used in generic resolution.
Or as "The new features of Fortran 2008" puts it:
"A pair of specific procedures in a generic interface are permitted to be
distinguishable by virtue of a pointer argument without intent in of one
corresponding to an allocatable argument of the other or a data argument of one
corresponding to a procedure argument of the other."
Fortran 2008's "126.96.36.199.5 Restrictions on generic declarations" has"
"Two dummy arguments are distinguishable if
- one is a procedure and the other is a data object,
- they are both data objects or known to be functions, and neither is TKR
compatible with the other,
- one has the ALLOCATABLE attribute and the other has the POINTER attribute, or
- one is a function with nonzero rank and the other is not known to be a
Interpretation request F08/0001 / 10-145 changes this ("EDITS to 10-007")"
'[286:4] In 188.8.131.52.5p3, after "the other has the POINTER attribute",
Insert "and not the INTENT(IN) attribute".'
Fortran 2003 just had ("16.2.3 Restrictions on generic declarations"):
"Two dummy arguments are distinguishable if neither is a subroutine and neither
is TKR compatible (184.108.40.206) with the other."
Summary: Fortran 2008: GENERIC resolution with
ALLOCATABLE/POINTER and PROCEDURE
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org