This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37297] New: Ambiguity check for F2003 GENERIC bindings is not yet fully conformant
- From: "domob at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2008 10:18:47 -0000
- Subject: [Bug fortran/37297] New: Ambiguity check for F2003 GENERIC bindings is not yet fully conformant
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In the current implementation of GENERIC type-bound procedures the check if two
specific targets of a GENERIC binding could be ambiguous (see standard 16.2.3
Restrictions on generic declarations) is not conformant with this section as it
does not handle passed-objects at the moment. The following code is accepted:
MODULE m
TYPE t
CONTAINS
PROCEDURE, PASS :: proc1
PROCEDURE, NOPASS :: proc2
GENERIC :: gen => proc1, proc2
END TYPE t
CONTAINS
SUBROUTINE proc1 (me)
IMPLICIT NONE
TYPE(t) :: me
END SUBROUTINE proc1
SUBROUTINE proc2 ()
IMPLICIT NONE
END SUBROUTINE proc2
END MODULE m
PROGRAM main
USE m
IMPLICIT NONE
TYPE(t) :: myobj
CALL myobj%gen ()
END PROGRAM main
While the CALL in the main-program would fit to both specific targets.
--
Summary: Ambiguity check for F2003 GENERIC bindings is not yet
fully conformant
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: domob at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37297