This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/39624] New: short-list explicit interfaces in generic interfaces if no match is found


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]