<?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 entry point does not define all dummy variables in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841113#M59082</link>
    <description>&lt;DIV&gt;Last night a collegue of mine checked in a file that produced this warning in our nightly build:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;Warning: This entry point does not define all dummy variables used in bounds or length expressions of automatic data objects.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;This person is a meticulous tester, so I knew he'd run the code, but the warning caught my attention and I decided to look at it - and didn't like it. I posed it to him in this simplified form:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;/SPAN&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;Subroutine E1(a)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;integer a,b(n),n&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;integer temp(n)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;...&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;entry E2(b,n)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;...&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;The F90 standard says (section 5.1.2.4.1):&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;If an explicit-shape array has bounds tht are nonconstant specification expressions, the bounds, and hence shape, are determined at entry to the procedure by evaluating the bounds expressions&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;I take this to mean that even if, when calling E1, the code executed never references b or n, it will still attempt to allocate n integers on the stack - and n is not defined. This worries me, even though this code has been run and seems to work.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;Does anyone know what the compiler will do with this? We are using CVF 6.6 but plan to upgrade to the current IVF compiler sometime in the next 6-9 months, so experience with/knowledge of either compiler will be of interest.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 09 Sep 2005 05:03:34 GMT</pubDate>
    <dc:creator>martymike</dc:creator>
    <dc:date>2005-09-09T05:03:34Z</dc:date>
    <item>
      <title>entry point does not define all dummy variables</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841113#M59082</link>
      <description>&lt;DIV&gt;Last night a collegue of mine checked in a file that produced this warning in our nightly build:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;Warning: This entry point does not define all dummy variables used in bounds or length expressions of automatic data objects.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;This person is a meticulous tester, so I knew he'd run the code, but the warning caught my attention and I decided to look at it - and didn't like it. I posed it to him in this simplified form:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;/SPAN&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;Subroutine E1(a)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;integer a,b(n),n&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;integer temp(n)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;...&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;entry E2(b,n)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;...&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;The F90 standard says (section 5.1.2.4.1):&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT face="Arial" size="2"&gt;If an explicit-shape array has bounds tht are nonconstant specification expressions, the bounds, and hence shape, are determined at entry to the procedure by evaluating the bounds expressions&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;I take this to mean that even if, when calling E1, the code executed never references b or n, it will still attempt to allocate n integers on the stack - and n is not defined. This worries me, even though this code has been run and seems to work.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;Does anyone know what the compiler will do with this? We are using CVF 6.6 but plan to upgrade to the current IVF compiler sometime in the next 6-9 months, so experience with/knowledge of either compiler will be of interest.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;SPAN class="423093923-07092005"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Sep 2005 05:03:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841113#M59082</guid>
      <dc:creator>martymike</dc:creator>
      <dc:date>2005-09-09T05:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: entry point does not define all dummy variables</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841114#M59083</link>
      <description>I've tried and failed to come up with a compilable example that produces this warning with CVF, based on what you've written. Can you come up with a complete example that does this?&lt;BR /&gt;&lt;BR /&gt;Note that the warning refers to automatic objects, so I suspect that the actual code is different from what you have represented here.</description>
      <pubDate>Fri, 09 Sep 2005 06:30:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841114#M59083</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2005-09-09T06:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: entry point does not define all dummy variables</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841115#M59084</link>
      <description>&lt;DIV&gt;Subroutine countItems(aSize)&lt;BR /&gt;implicit none&lt;BR /&gt;integer aSize,dSize,nTypes,stuff(dSize,nTypes),ierr&lt;BR /&gt;character*(*) ids(nTypes)&lt;BR /&gt;integer ii,temp(dSize),icount&lt;/DIV&gt;
&lt;DIV&gt;call get_size(icount)&lt;BR /&gt;aSize=icount&lt;BR /&gt;return&lt;/DIV&gt;
&lt;DIV&gt;entry getData(stuff,dSize,nTypes,ids,ierr)&lt;BR /&gt;ierr=0&lt;BR /&gt;call get_size(icount)&lt;BR /&gt;if (icount&amp;gt;dSize) then&lt;BR /&gt; ierr=1&lt;BR /&gt; return&lt;BR /&gt;endif&lt;BR /&gt;do ii=1,nTypes&lt;BR /&gt; call compute_results(ids(ii),temp)&lt;BR /&gt; stuff(:icount,ii)=temp&lt;BR /&gt;enddo&lt;BR /&gt;end&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I realize that in this case were aSize simply renamed dSize the warning goes away. This code does get the warning, however, and does compile. The point of the question is to verify my understanding of the consequences of ignoring the warning, for the purpose of convincing someone else to modify his seven 1000-line programs - or to find out that I am wrong and that it doesn't matter.&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Sep 2005 01:41:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841115#M59084</guid>
      <dc:creator>martymike</dc:creator>
      <dc:date>2005-09-13T01:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: entry point does not define all dummy variables</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841116#M59085</link>
      <description>Ok, I can reproduce it with your example (and cut down some.)&lt;BR /&gt;&lt;BR /&gt;My initial reading of the standard suggests that the compiler is wrong here.  IVF give sthe same complaint.  I'll check with our standards committee rep to see whet he says, and to find out if there were any interpretations to the standard that affected this.</description>
      <pubDate>Tue, 13 Sep 2005 06:08:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841116#M59085</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2005-09-13T06:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: entry point does not define all dummy variables</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841117#M59086</link>
      <description>We agree that this is a bug.  I have passed it on to development to be fixed.  I'll note that the code seems to work anyway, and it's unclear to us what was in the mind of whoever added this warning.</description>
      <pubDate>Wed, 14 Sep 2005 00:57:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841117#M59086</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2005-09-14T00:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: entry point does not define all dummy variables</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841118#M59087</link>
      <description>&lt;DIV&gt;OK, I'm confused.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;It didn't appear to be a bug to me, I thought the source code was wrong because there was an automatic array whose extents were defined by dummy arguments not present in all the entry points (unless you mean that the bug is that it ought to be an error not a warning).&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I can accept that I'm wrong, but I'd like to know why. Can you explain?&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Sep 2005 01:40:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841118#M59087</guid>
      <dc:creator>martymike</dc:creator>
      <dc:date>2005-09-14T01:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: entry point does not define all dummy variables</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841119#M59088</link>
      <description>There should be no diagnostic at all.  The standard permits the declaration as long as there is no reference to the automatic array in the executable code except through a code path that originated with a call to an entry point which defined the argument.  The exact wording of the standard is:&lt;BR /&gt;&lt;BR /&gt;If a dummy argument is used in a specification expression to specify an array bound or character length&lt;BR /&gt;of an object, the appearance of the object in a statement that is executed during a procedure reference&lt;BR /&gt;is permitted only if the dummy argument appears in the dummy argument list of the procedure name&lt;BR /&gt;referenced and it is present (12.4.1.6).&lt;BR /&gt;&lt;BR /&gt;If subroutine countitems referenced array temp, that would be an error, though not one the compiler is likely to detect.</description>
      <pubDate>Wed, 14 Sep 2005 02:11:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/entry-point-does-not-define-all-dummy-variables/m-p/841119#M59088</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2005-09-14T02:11:41Z</dc:date>
    </item>
  </channel>
</rss>

