[bug] problem with type bound generic functions

[bug] problem with type bound generic functions

Hi,
following (IMO valid ;) ) code

module foo implicit none type cg_list_T contains procedure :: del_lnk procedure :: del_lst generic, public :: delete => del_lnk, del_lst end type cg_list_T contains subroutine del_lnk(this, cgle) implicit none class(cg_list_T), intent(inout) :: this real, pointer :: cgle nullify(cgle) end subroutine del_lnk subroutine del_lst(this) implicit none class(cg_list_T), intent(inout) :: this print *, "in del_lst" end subroutine del_lst end module foo module bar use foo, only: cg_list_T implicit none type(cg_list_T) :: all_cg end module bar program cleanup_grid use bar, only: all_cg implicit none call all_cg%delete end program cleanup_grid
produce compilation error:
$ ifort foo.F90 foo.F90(38): error #8486: There is no matching specific subroutine for this type bound generic subroutine call. [DELETE] call all_cg%delete ---------------^ compilation aborted for foo.F90 (code 1)

whereas it works fine with gfortran:
$ gfortran foo.F90 $ ./a.out in del_lst $ gfortran -v | grep "gcc version" gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC) 
I'm using:
$ ifort -V Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.5.339 Build 20120612
Best regards,
Kacper Kowalik

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks - I can reproduce this. The 13.0 compiler, to be released in September, isn't any better with this. I will let the developers know. Removing the ONLY clause in module BAR is a workaround. Issue ID is DPD200234975.

Steve - Intel Developer Support

This got fixed in compiler version 14.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today