Community
cancel
Showing results for 
Search instead for 
Did you mean: 
efnacy
New Contributor I
60 Views

Why does -warn interfaces not issue warning even if an external subroutine does not have interface?

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.

0 Kudos
0 Replies
Reply