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.

Procedure interface

tonio
Beginner
407 Views
Hello,

with the following example :

module m_alloc

implicit none

interface alloc
module procedure alloc_a , alloc_p
end interface

contains

subroutine alloc_a(n,a)
integer, intent(in) :: n
real*8, allocatable :: a(:)
allocate(a(n))
end subroutine alloc_a

subroutine alloc_p(n,p)
integer, intent(in) :: n
real*8, pointer :: p(:)
allocate(p(n))
end subroutine alloc_p

end module m_alloc


I get the error :

The type/rank/keyword signature for this specific procedure matches another specific procedure that shares the same generic-name.

Isn't the compiler supposed to make a difference between allocatable and pointer types ?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
407 Views
No. The only attributes used for generic interface matching are type, kind and rank.
0 Kudos
Reply