[Fortran] 纯文本查看 复制代码 module pgi_generic
implicit none
interface test
module procedure test2
module procedure test3
end interface test
contains !------------------------------
subroutine test2(a)
implicit none
integer,intent(in) :: a(0:3)
write(*,*) a
end subroutine test2
!-----------------
subroutine test3(a)
implicit none
integer,intent(in) :: a(3)
write(*,*) a
end subroutine test3
end module pgi_generic
!---------------------------------------
program test
use pgi_generic
implicit none
integer :: a(0:3), b(3)
a = (/0, 1, 2, 3/)
b = (/4, 5, 6/)
!---> PGI compile-time error: ambiguous interface for generic procedure test
CALL test(a)
CALL test(b)
end program test
PGI沒有一陸錯到底
|