Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Discussions

[bug] problem with type bound generic functions

Kacper_Kowalik
Beginner
617 Views

Hi,
following (IMO valid ;) ) code
[fortran]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[/fortran] produce compilation error:
[bash]$ 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)[/bash]
whereas it works fine with gfortran:
[bash]$ 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) [/bash] I'm using:
[bash]$ ifort -V Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.5.339 Build 20120612[/bash] Best regards,
Kacper Kowalik

0 Kudos
2 Replies
Steven_L_Intel1
Employee
617 Views
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.
0 Kudos
Steven_L_Intel1
Employee
617 Views

This got fixed in compiler version 14.

0 Kudos
Reply