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

error not detected unless -warn all is given

warpino
Beginner
286 Views

Hi all,

I am debugging a friend's code. At some point he calls a subroutine with the wrong number of arguments, actually he gives more actual arguments than dummy ones. I didn't spot the error until I used the -warn all option to compile. Is this the expected behaviour?

Using Intel Fortran Compiler for Intel64, Version 15 on Linux CentOS 6

 

Thanks in advance,

 

NL

 

0 Kudos
1 Reply
jimdempseyatthecove
Honored Contributor III
286 Views

The -warn all option generates interfaces and checks interfaces. The Fortran compiler cannot verify calling arguments for subroutines and functions that do not have/use interfaces. Subroutines and functions contained in modules have interfaces by default, Those non-module subroutines and functions do not have interfaces (though some checking could potentially be performed in the IPO phase).

Jim Dempsey

0 Kudos
Reply