<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic It is quite simple, a in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107147#M128381</link>
    <description>&lt;P&gt;&lt;SPAN style="font-size: 16.26px;"&gt;It is quite simple, a function must have a declaration of type in the routine that call its&amp;nbsp;&lt;/SPAN&gt;or an explicit interface. So the absence of both is an error. A subroutine to not have a type so there is no error, it is just assumed to be external if there is no interface.&lt;/P&gt;

&lt;P&gt;Roll on Fortran 2015 with&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;IMPLICIT NONE(EXTERNAL) which mean the subroutines without an explict interface will generate and error. This will save time (where everything is in modules) as we will get compile time errors rather than having a link error at the very end..&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2016 09:43:38 GMT</pubDate>
    <dc:creator>andrew_4619</dc:creator>
    <dc:date>2016-12-07T09:43:38Z</dc:date>
    <item>
      <title>Module compiles without warning of missing routines?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107140#M128374</link>
      <description>&lt;P&gt;I have a project setup as a static library in Visual Studio 2015.&amp;nbsp; After I finish each module, I do a test compile to catch any errors and in particular if I forgot to add the necessary USE statements.&amp;nbsp;&amp;nbsp; I just finished a large module which contains numerous calls to subroutines in other modules (already completed and compiled).&amp;nbsp; The module compiled with only warnings about missing functions.&amp;nbsp; When I added the appropriate USE statements for the functions, the module compiled without any errors or warnings despite missing all the USE statements containing the subroutine definitions.&amp;nbsp;&amp;nbsp; I did a test compile with all USE statements removed in case there was some hidden propagation of the needed subroutines.&amp;nbsp; The module compiled with only messages about the functions.&lt;/P&gt;

&lt;P&gt;Can someone help explain why the compiler is not complaining about the missing subroutine definitions?&amp;nbsp; And why it is complaining about the missing function definitions?&amp;nbsp; By the way, before compiling the latest module, I make sure all the other modules have been compiled.&lt;/P&gt;

&lt;P&gt;Here are my compiler options:&lt;/P&gt;

&lt;P&gt;/nologo /debug:full /Od /stand:f08 /warn:declarations /warn:unused /warn:interfaces /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\vc140.pdb" /list:"x64\Debug\static_library.lst" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c&lt;/P&gt;

&lt;P&gt;Thanks….&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 22:33:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107140#M128374</guid>
      <dc:creator>chauvjo</dc:creator>
      <dc:date>2016-12-06T22:33:18Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt; the module compiled</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107141#M128375</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp;the module compiled without any errors or warnings despite missing all the USE statements containing the subroutine definitions.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Do you mean to say:&lt;/P&gt;

&lt;P&gt;you have a module with INTERFACE declarations to subroutines contained in a different module in a CONTAINS section?&lt;/P&gt;

&lt;P&gt;If this is what you mean, then you have multiple declarations of the interface (one in the INTERFACE block in one module, and the actual interface in the module with the CONTAINS contained subroutine). This is not permitted.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 22:49:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107141#M128375</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-12-06T22:49:20Z</dc:date>
    </item>
    <item>
      <title>Fortran has a long tradition</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107142#M128376</link>
      <description>&lt;P&gt;Fortran has a long tradition of separate compilation. Each program unit can be compiled independently of the rest. It is only at link time that the object files from all units that form a program are linked together, and a list of unsatisfied externals printed, if any.&lt;/P&gt;

&lt;P&gt;You are confusing compiling and linking, which is understandable because the driver, ifort.exe, depending on the switches used, is capable of compiling only, linking only, or both. If you use the IDE, again things are done for you unseen, and it may not be clear to you what is being done.&lt;/P&gt;

&lt;P&gt;When compiling modules, you should use the /c switch. If you do not, you will get lots of linker errors about unsatisfied externals, but it is easy to make a habit of ignoring such messages.&lt;/P&gt;

&lt;P&gt;When you leave out USE statements, the compiler will assume that calls to external subroutines and functions may be made with implicit interfaces. The compilation will proceed, but after linking the program may fail to run properly if the actual interface does not agree with the implicit interface.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 23:06:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107142#M128376</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-12-06T23:06:07Z</dc:date>
    </item>
    <item>
      <title>Thanks for the replies. All</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107143#M128377</link>
      <description>&lt;P&gt;Thanks for the replies. All my subroutines are "contained" in other modules so my understanding is I do not need to add INTERFACE blocks to any of my routines. None of the modules have INTERFACE blocks. &amp;nbsp;I still not sure why I received warning about missing functions and not subroutines.&amp;nbsp;&amp;nbsp;So&amp;nbsp;if I&amp;nbsp;understand correctly, I need to create a command line project, add a dummy main program and do a full compile and link to have the compiler catch all the missing USE statements or am I still missing something? If so, how can I have the compiler caught missing subroutine definitions?&lt;/P&gt;

&lt;P&gt;Thanks....&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 23:39:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107143#M128377</guid>
      <dc:creator>chauvjo</dc:creator>
      <dc:date>2016-12-06T23:39:09Z</dc:date>
    </item>
    <item>
      <title>When Fortran 2015 is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107144#M128378</link>
      <description>&lt;P&gt;When Fortran 2015 is implemented in compilers, you will be able to use the&amp;nbsp;IMPLICIT NONE(EXTERNAL) declaration.&lt;/P&gt;

&lt;P&gt;You can also compile multiple source files with the /warn:interfaces option. There are a number of Ifort options pertaining to interfaces, which you may want to become familiar with.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 23:52:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107144#M128378</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-12-06T23:52:32Z</dc:date>
    </item>
    <item>
      <title>Shamsundar, N</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107145#M128379</link>
      <description>&lt;DIV class="forum-post-author"&gt;&lt;A href="https://software.intel.com/en-us/user/9972"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;Shamsundar, N&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;

&lt;DIV class="forum-post-author"&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV class="forum-post-author"&gt;
	&lt;P&gt;Thanks for the reply. I listed the compiler options in my original posting which does include the option /warn:interfaces&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Dec 2016 23:58:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107145#M128379</guid>
      <dc:creator>chauvjo</dc:creator>
      <dc:date>2016-12-06T23:58:15Z</dc:date>
    </item>
    <item>
      <title>When you compile a module, if</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107146#M128380</link>
      <description>&lt;P&gt;When you compile a module, if there is/are CONTAINS code, or initialized data, the compiler produces 2 output files:&lt;/P&gt;

&lt;P&gt;1) a .mod file, which is somewhat like a C/C++ pre-compiled header&lt;BR /&gt;
	2) a .o (or .obj if on Windows)&lt;/P&gt;

&lt;P&gt;The .mod file is the one USE's&lt;BR /&gt;
	The .o file is what is to be linked into your executable/library/so&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 01:24:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107146#M128380</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-12-07T01:24:57Z</dc:date>
    </item>
    <item>
      <title>It is quite simple, a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107147#M128381</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 16.26px;"&gt;It is quite simple, a function must have a declaration of type in the routine that call its&amp;nbsp;&lt;/SPAN&gt;or an explicit interface. So the absence of both is an error. A subroutine to not have a type so there is no error, it is just assumed to be external if there is no interface.&lt;/P&gt;

&lt;P&gt;Roll on Fortran 2015 with&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;IMPLICIT NONE(EXTERNAL) which mean the subroutines without an explict interface will generate and error. This will save time (where everything is in modules) as we will get compile time errors rather than having a link error at the very end..&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 09:43:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107147#M128381</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2016-12-07T09:43:38Z</dc:date>
    </item>
    <item>
      <title>Quote:andrew_4619 wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107148#M128382</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;andrew_4619 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;It is quite simple, a function must have a declaration of type in the routine that call its&amp;nbsp;or an explicit interface. So the absence of both is an error. A subroutine to not have a type so there is no error, it is just assumed to be external if there is no interface.&lt;/P&gt;

&lt;P&gt;Roll on Fortran 2015 with&amp;nbsp;IMPLICIT NONE(EXTERNAL) which mean the subroutines without an explict interface will generate and error. This will save time (where everything is in modules) as we will get compile time errors rather than having a link error at the very end.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;That should be "...when subroutines without the external attribute...".&amp;nbsp; They will still be permitted to have an implicit interface.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 17:18:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107148#M128382</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2016-12-07T17:18:09Z</dc:date>
    </item>
    <item>
      <title>I have asked Santa IMPLICIT</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107149#M128383</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 12px; background-color: rgb(238, 238, 238);"&gt;I have asked Santa IMPLICIT NONE(EXTERNAL) but I think I will not have been good enough this year.....&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 17:28:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107149#M128383</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2016-12-07T17:28:15Z</dc:date>
    </item>
    <item>
      <title>I once asked Santa about</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107150#M128384</link>
      <description>&lt;P&gt;I once asked Santa about implementing a compiler warning, separate to the language rules (existing or future), whenever a procedure with an implicit interface was referenced or otherwise appeared.&amp;nbsp; This was after queueing up at the local shopping centre for half an hour.&amp;nbsp; Santa just looked confused (and was complaining about my weight), so after I had my picture taken, I gave him a copy of ISO 1539-1:2010.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 17:44:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-compiles-without-warning-of-missing-routines/m-p/1107150#M128384</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2016-12-07T17:44:47Z</dc:date>
    </item>
  </channel>
</rss>

