- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using ifort 18.0.0 and I am trying to make it check the presence of explicit interfaces in my codes. My interfaces are placed in module mymod contained in file mymod.f90. In a procedure somesub, a call to another procedure mysub is made. The interface for mysub is inside mymod module. The codes are more or less like the following.
mymod.f90
module mymod
use, intrinsic :: iso_c_binding
implicit none
interface
subroutine mysub(a)
integer(c_long) :: a
end subroutine mysub
end interface
end module mymod
somesub.f90
subroutine somesub()
use, intrinsic :: iso_c_binding
use mymod, only : mysub
implicit none
integer(c_long) :: a = 1
call mysub(a)
end subroutine somesub
somesub() is an external procedure.
And my compile command is
ifort -warn interfaces -nogen-interfaces -mkl -I../MOD/ -c somesub.f90
MOD is the directory where mymod.f90, mymod.o, and mymod.mod are. When the ''use mymod, only : mysub'' line in somesub.f90 is commented out, it should be oblivious of the presence of mysub interface, yet ifort doesn't give any warning nor error.
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page