This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45521] New: Fortran 2008: GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2010 15:04:20 -0000
- Subject: [Bug fortran/45521] New: Fortran 2008: GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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 "12.4.3.4.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
function."
Interpretation request F08/0001 / 10-145 changes this ("EDITS to 10-007")"
'[286:4] In 12.4.3.4.5p3, after "the other has the POINTER attribute",
Insert "and not the INTENT(IN) attribute".'
Cf. http://j3-fortran.org/doc/meeting/193/10-199.txt
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 (5.1.1.2) with the other."
--
Summary: Fortran 2008: GENERIC resolution with
ALLOCATABLE/POINTER and PROCEDURE
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 39627
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45521