<?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 Thanks for all the responses. in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997610#M102798</link>
    <description>&lt;P&gt;Thanks for all the responses. &amp;nbsp;I have chosen a way to break these multiple entry routines apart. &amp;nbsp;All I needed was a push, and the fact that this kind of code is not supportable in the future, and all your comments set me free! &amp;nbsp;It is amazing how much spaghetti can be produced in code! &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best wishes to all!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jul 2015 13:17:25 GMT</pubDate>
    <dc:creator>Alan_B_2</dc:creator>
    <dc:date>2015-07-03T13:17:25Z</dc:date>
    <item>
      <title>Runtime issues in legacy multiple entry subroutines</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997598#M102786</link>
      <description>&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 153); font-family: Arial, sans-serif; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; "&gt;Hi, I am in evaluation mode of your product on Windows and OS X. I am trying to get some legacy FORTRAN IV code running and I have issues with existing multiple entry point subroutines. Here is a basic sample that has the problem I am having:&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 153); font-family: Arial, sans-serif; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; "&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DIMENSION TEST(10),NTEST(5)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N=5&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CALL TESTENTRY(N,TEST,NTEST)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A=2.&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B=3.&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C=5.&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I=2&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CALL ENTRY1(I,A,B,C)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SUBROUTINE TESTENTRY(NENT,TESTENT,NTESTENT)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DIMENSION TESTENT(NENT),NTESTENT(NENT+1)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RETURN&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ENTRY ENTRY1(ICOUNT,A,B,C)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DO 10 I=1,ICOUNT&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TESTENT(I) = A*FLOAT(I)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NTESTENT(I) = I&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;10 &amp;nbsp; CONTINUE&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RETURN&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 153); font-family: Arial, sans-serif; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; "&gt;what happens is the program logic expects the arrays to be available under ENTRY1 but they are not available, as indicated in the debugger with a breakpoint set at the first line of the do loop. &amp;nbsp;It appears the arrays and variables available in the main entry are not available in the second entry, even the integer NENT. &amp;nbsp; Is there some flag I can set for the compiler to understand this kind of FORTRAN IV style logic?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 153); font-family: Arial, sans-serif; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; "&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 17:52:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997598#M102786</guid>
      <dc:creator>Alan_B_2</dc:creator>
      <dc:date>2015-07-02T17:52:27Z</dc:date>
    </item>
    <item>
      <title>This is not a legacy, it is a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997599#M102787</link>
      <description>&lt;P&gt;This is not a legacy, it is non-conforming code that has been passed on to you.&lt;/P&gt;

&lt;P&gt;The Fortran manual has this under ENTRY:&lt;/P&gt;

&lt;P&gt;"&lt;EM&gt;Dummy arguments can be used in ENTRY statements even if they differ in order, number, type and kind parameters, and name from the dummy arguments used in the FUNCTION, SUBROUTINE, and other ENTRY statements in the same subprogram. However, each reference to a function, subroutine, or entry must use an actual argument list that agrees in order, number, and type with the dummy argument list in the corresponding FUNCTION, SUBROUTINE, or ENTRY statement&lt;/EM&gt;."&lt;/P&gt;

&lt;P&gt;"&lt;EM&gt;Dummy arguments can be referred to only in executable statements that follow the first SUBROUTINE, FUNCTION, or ENTRY statement in which the dummy argument is specified. If a dummy argument is not currently associated with an actual argument, the dummy argument is undefined and cannot be referenced. Arguments do not retain their association from one reference of a subprogram to another&lt;/EM&gt;."&lt;/P&gt;

&lt;P&gt;These rules are quite sensible. Your ENTRY contains one integer and three real arguments, whereas the SUBROUTINE takes two integer and one real arguments. When you call ENTRY1,&amp;nbsp;NTESTENT is neither a local variable nor a known ENTRY argument, so the code is not compilable.&lt;/P&gt;

&lt;P&gt;Page 34 of&amp;nbsp;http://www.math.utah.edu/~beebe/software/fortran-documentation/ftnsum.pdf has this interesting entry for ENTRY:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;10.7.9 ENTRY statement&lt;BR /&gt;
	The ENTRY statement is a rarely used Fortran feature that permits a routine&lt;BR /&gt;
	to have multiple names and argument lists. Its use is strongly discouraged,&lt;BR /&gt;
	and its syntax will not even be shown here.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 18:12:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997599#M102787</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-07-02T18:12:00Z</dc:date>
    </item>
    <item>
      <title>Thanks, not what I wanted to</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997600#M102788</link>
      <description>&lt;P&gt;Thanks, not what I wanted to hear. &amp;nbsp;I was amazed when I saw this logic in the first place. &amp;nbsp;This kind of code was supposedly running under FORTRAN IV in 1980. &amp;nbsp;I suppose the compilers then saved the arguments passed in the main call and made them available below the other entry points. &amp;nbsp;I will need to separate the routines some how with common blocks and with dimension parameters passed I suppose. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 18:31:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997600#M102788</guid>
      <dc:creator>Alan_B_2</dc:creator>
      <dc:date>2015-07-02T18:31:26Z</dc:date>
    </item>
    <item>
      <title>As mecej4 says, this isnt</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997601#M102789</link>
      <description>&lt;P&gt;As mecej4 says, this isnt valid FORTRAN IV code. However, this "trick" did work in some compilers of the time as an accident of the implementation used for ENTRY. I once worked on such a compiler, VAX Fortran, but there were others then where this would not have worked.&lt;/P&gt;

&lt;P&gt;You could use COMMON or module variables, or just pass all the arguments in the single call and get rid of ENTRY.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 18:39:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997601#M102789</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-07-02T18:39:35Z</dc:date>
    </item>
    <item>
      <title>Thanks for the reply.  Your</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997602#M102790</link>
      <description>&lt;P&gt;Thanks for the reply. &amp;nbsp;Your fix should work but the call lists will be very long, and the programmer called these other entries from routines that do not have available the variables in the main call list. &amp;nbsp;It is like the programmer was hacking a pseudo block-dimensioning type thing with this logic.&lt;/P&gt;

&lt;P&gt;I thought the VAX f77 &amp;nbsp;I used in the 80's was compliant! &amp;nbsp;I guess you indicate it to have allowed some stuff not so compliant. &amp;nbsp; As far as I can tell this code was running on an IBM of the times. &amp;nbsp;There are other things this code does that makes the new compilers sing as well. &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 19:09:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997602#M102790</guid>
      <dc:creator>Alan_B_2</dc:creator>
      <dc:date>2015-07-02T19:09:39Z</dc:date>
    </item>
    <item>
      <title>If the original code worked</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997603#M102791</link>
      <description>&lt;P&gt;If the original code worked properly, sanitizing it should be straightforward.&lt;/P&gt;

&lt;P&gt;Make two copies of the old code. &amp;nbsp;In the first copy, remove the ENTRY statement and all lines of code that could only be executed when the ENTRY was called in the original code.&lt;/P&gt;

&lt;P&gt;In the second copy, replace the SUBROUTINE statement with a SUBROUTINE statement with the former ENTRY name used as the subroutine name, and the former ENTRY argument list as the subroutine argument list. Remove all lines of code that could only be executed when the SUBROUTINE was called in the original code.&lt;/P&gt;

&lt;P&gt;Remove any orphan declarations in the two new codes and clean up comments, if any.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;the programmer called these other entries from routines that do not have available the variables in the main call list &lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;That should not be a problem, since after the changes that I indicated you will have two separate subroutines instead of siamese twins.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 19:10:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997603#M102791</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-07-02T19:10:00Z</dc:date>
    </item>
    <item>
      <title>This was one of the pre-77</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997604#M102792</link>
      <description>&lt;P&gt;This was one of the pre-77 non-standard usages.&amp;nbsp; It should have worked in single threaded non-reentrant context (no RECURSIVE) if all the shared arguments were copied explicitly to and from SAVEd variables/arrays, or, as previously mentioned, copied to COMMON in compilers where COMMON stays in scope.&lt;/P&gt;

&lt;P&gt;It would be a little disappointing if something could have been written so as to work in VAX Fortran extensions but not DEC x86 Fortran.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 19:30:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997604#M102792</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2015-07-02T19:30:00Z</dc:date>
    </item>
    <item>
      <title>VAX Fortran 77 was indeed</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997605#M102793</link>
      <description>&lt;P&gt;VAX Fortran 77 was indeed compliant with Fortran 77. That is, if presented with a standard-conforming program it would process it as the standard specifies. The behavior being relied on here was not even a documented extension - it was taking advantage of the internal implementation of ENTRY.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 20:11:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997605#M102793</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-07-02T20:11:59Z</dc:date>
    </item>
    <item>
      <title>One of the implementations of</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997606#M102794</link>
      <description>&lt;P&gt;One of the implementations of f66 with ENTRY automatically used the same argument list as the main entry point.&amp;nbsp; These problems with ENTRY may have been reasons why f90 introduced the requirement for an option to flag non-compliant extensions, if they are accepted.&amp;nbsp; It's difficult for me to know which of those must be caught under a flag such as ifort -stand.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 00:13:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997606#M102794</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2015-07-03T00:13:53Z</dc:date>
    </item>
    <item>
      <title>You could perhaps try to save</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997607#M102795</link>
      <description>&lt;P&gt;You could perhaps try to save the arguments passed to subroutine TESTENTRY:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUBROUTINE TESTENTRY(INENT,PTESTENT,PNTESTENT)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USE ISO_C_BINDING
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE(C_PTR) PTESTENT, PNTESTENT
!DEC$ ATTRIBUTES VALUE :: PTESTENT, PNTESTENT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SAVE TESTENT, NTESTENT, NENT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DIMENSION TESTENT(:), NTESTENT(:)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; POINTER TESTENT, NTESTENT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NENT = INENT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL C_F_POINTER(PTESTENT,TESTENT,(/NENT/))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL C_F_POINTER(PNTESTENT,NTESTENT,(/NENT+1/))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RETURN 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENTRY ENTRY1(ICOUNT,A,B,C) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO 10 I=1,ICOUNT 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TESTENT(I) = A*FLOAT(I) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NTESTENT(I) = I 
&amp;nbsp; 10&amp;nbsp;&amp;nbsp; CONTINUE 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RETURN 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END

&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 00:25:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997607#M102795</guid>
      <dc:creator>JVanB</dc:creator>
      <dc:date>2015-07-03T00:25:03Z</dc:date>
    </item>
    <item>
      <title>Quote:Tim Prince wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997608#M102796</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Tim Prince wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;One of the implementations of f66 with ENTRY automatically used the same argument list as the main entry point.&amp;nbsp; These problems with ENTRY may have been reasons why f90 introduced the requirement for an option to flag non-compliant extensions, if they are accepted.&amp;nbsp; It's difficult for me to know which of those must be caught under a flag such as ifort -stand.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;It's not difficult at all when you see what the standard says. The relevant section of Fortran 2008 is 1.5 Conformance, but the simple rule is that if the code does not violate a numbered syntax rule or constraint, the compiler is not required to be able to report it. The restriction on ENTRY is not in a numbered syntax rule or constraint, and it can't be, because detecting this error means that the compiler has to 100% understand the control flow of the program. The restriction is on the program to not access dummy arguments except through the active entry point.&lt;/P&gt;

&lt;P&gt;So, the only aspect of this code that the compiler is required to diagnose is the use of ENTRY itself, which is obsolescent.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 00:49:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997608#M102796</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-07-03T00:49:41Z</dc:date>
    </item>
    <item>
      <title>One of the problems</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997609#M102797</link>
      <description>&lt;P&gt;One of the problems highlighted by the present code extract is that its correct functioning depends on calls being made in proper sequence.&lt;/P&gt;

&lt;P&gt;The caller has to make a 'priming' call to TESTENTRY before calling ENTRY1. In fact, since the only executable statement of the TESTENTRY part is RETURN, the entire purpose of calling TESTENTRY is to save the argument(s) is preparation for the anticipated call to ENTRY1. RepeatOffender's solution adds executable statements to effect this 'save!' action, but that solution also depends on proper sequencing of calls.&lt;/P&gt;

&lt;P&gt;I shudder to think of what compiler optimizations&amp;nbsp;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 13.0080003738403px;"&gt;would do to this code&lt;/SPAN&gt;, &amp;nbsp;in particular IPO and code inlining.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 01:16:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997609#M102797</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-07-03T01:16:00Z</dc:date>
    </item>
    <item>
      <title>Thanks for all the responses.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997610#M102798</link>
      <description>&lt;P&gt;Thanks for all the responses. &amp;nbsp;I have chosen a way to break these multiple entry routines apart. &amp;nbsp;All I needed was a push, and the fact that this kind of code is not supportable in the future, and all your comments set me free! &amp;nbsp;It is amazing how much spaghetti can be produced in code! &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best wishes to all!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 13:17:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997610#M102798</guid>
      <dc:creator>Alan_B_2</dc:creator>
      <dc:date>2015-07-03T13:17:25Z</dc:date>
    </item>
    <item>
      <title>Mecej4 is correct, but I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997611#M102799</link>
      <description>&lt;P&gt;Mecej4 is correct, but I think the description requires expansion for better understanding.&lt;/P&gt;

&lt;P&gt;The first call places information on the program's stack (the references and/or values).&lt;BR /&gt;
	The return from the first call leaves them there. But be mindful that the stack locations where these argument reside are now&amp;nbsp;in unclaimed territory.&lt;BR /&gt;
	On the call to the ENTRY...&lt;BR /&gt;
	*** provided nothing between the calls disturbed what was formerly on the stack from the first call, such as a&amp;nbsp;diagnostic PRINT&amp;nbsp;***&lt;BR /&gt;
	... the entry arguments are located on the stack, overwriting those locations on the stack formerly used on the prior call(s). Unless these ENTRY variables are intended to replace former call(s) variables, they will invalidate those other variables. This invalidation is not reported by the runtime system, other than possibly by a program crash or the program using/trashing something unintended.&lt;/P&gt;

&lt;P&gt;The earlier compilers had to do these kinds of things because memory was at a premium. Today, it is a different story, some of these legacy characteristics have been phased out in favor of newer (desirable) features.&lt;/P&gt;

&lt;P&gt;Mecej4, also points out that this kind of code should not be inlined (via IPO), which is default behavior now,&amp;nbsp;as in doing so essentially eliminates the stack for context carryover.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 15:18:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997611#M102799</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2015-07-03T15:18:37Z</dc:date>
    </item>
    <item>
      <title>I do not think the code is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997612#M102800</link>
      <description>&lt;P&gt;I do not think the code is relatable to spaghetti, I think it is more liken to Lasagna with carefully crafted layers of stuff you may find confusing (today). If you mess up one layer, you ruin the whole dish.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 15:21:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997612#M102800</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2015-07-03T15:21:58Z</dc:date>
    </item>
    <item>
      <title>Yes the layers for the small</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997613#M102801</link>
      <description>&lt;P&gt;Yes the layers for the small example I sent, but the programer did things like entering in one section of code then having a goto statement to a label above the entry just executed. &amp;nbsp;I guess it worked because the return in this case was once again below the entry, &amp;nbsp;Hardly layered. &amp;nbsp;It is something I guess worked, in the past but it seems so convoluted today, or even convoluted in f77 days. &amp;nbsp;I also had to regenerate the code from an impact line printer printout photo copied who knows how many times; digital source lost or never supplied. &amp;nbsp;Lots of chopped of characters that in context are, I hope, deciphered correctly.&lt;/P&gt;

&lt;P&gt;Thanks again for the clarifications.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2015 16:41:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Runtime-issues-in-legacy-multiple-entry-subroutines/m-p/997613#M102801</guid>
      <dc:creator>Alan_B_2</dc:creator>
      <dc:date>2015-07-03T16:41:34Z</dc:date>
    </item>
  </channel>
</rss>

