Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Procedure interface

tonio
Beginner
364 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
364 Views
No. The only attributes used for generic interface matching are type, kind and rank.
0 Kudos
Reply