This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39624] New: short-list explicit interfaces in generic interfaces if no match is found
- From: "dfranke 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 Apr 2009 11:27:48 -0000
- Subject: [Bug fortran/39624] New: short-list explicit interfaces in generic interfaces if no match is found
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
It would be nice if we could provide a list of possible candidates for generic
in the example below. (Something similar is implemented in C++ if a particular
overload is not found, all possible prototypes are listed.)
$> cat candidates.f90
MODULE amodule
INTERFACE generic
MODULE PROCEDURE specific_1
MODULE PROCEDURE specific_2
END INTERFACE
CONTAINS
SUBROUTINE specific_1(i)
INTEGER, INTENT(in) :: i
END SUBROUTINE
SUBROUTINE specific_2(r)
REAL, INTENT(in) :: r
END SUBROUTINE
END MODULE
USE amodule
CALL generic("string")
END
$> gfortran-svn candidates.f90
candidates.f90:18.24:
CALL generic("string")
1
Error: There is no specific subroutine for the generic 'generic' at (1)
[Candidates are:
subroutine generic(integer)
subroutine generic(real)]
--
Summary: short-list explicit interfaces in generic interfaces if
no match is found
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dfranke at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39624