<?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 all for the reply. 2 in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125887#M132879</link>
    <description>&lt;P&gt;Thanks all for the reply. 2 remarks:&lt;/P&gt;&lt;P&gt;- Previously the compiler managed to handle it as I described. Why did it change? Did Intel changed it to comply?&lt;/P&gt;&lt;P&gt;- It's hard to find this code in more then 100000 lines of Fortran. That's why I can't use Jim's trick while it works. I don't know at the first place why this code was used because at the best nothing will happen! So I dropped it at the spot where I found it. My concern: Is this used more?&lt;/P&gt;&lt;P&gt;Thanks again for the help.&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2019 05:47:09 GMT</pubDate>
    <dc:creator>Annegarn__Paul</dc:creator>
    <dc:date>2019-04-11T05:47:09Z</dc:date>
    <item>
      <title>Write statement operates differently with compiler XE2019</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125882#M132874</link>
      <description>&lt;P&gt;XE2019 compared to XE2016:&lt;/P&gt;&lt;P&gt;Consider Fortran Code:&lt;/P&gt;&lt;P&gt;Character*4&amp;nbsp; s&lt;/P&gt;&lt;P&gt;s = '1234'&lt;/P&gt;&lt;P&gt;Write( s, '(A4)') s&lt;/P&gt;&lt;P&gt;The string 's' is empty with XE2019 and contains '1234' with XE2016.&lt;/P&gt;&lt;P&gt;I know this code looks silly. It is what I found in my project. And maybe other constructions are involved as well.&lt;/P&gt;&lt;P&gt;Can I prevent this changed behavior with a compiler setting? Or will it be fixed?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 07:18:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125882#M132874</guid>
      <dc:creator>Annegarn__Paul</dc:creator>
      <dc:date>2019-04-10T07:18:28Z</dc:date>
    </item>
    <item>
      <title>It looks like a bug in Intel</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125883#M132875</link>
      <description>&lt;P&gt;It looks like a bug in Intel Fortran compiler.&amp;nbsp; Your best option may be to submit a request at Intel support center:&amp;nbsp;https://supporttickets.intel.com/servicecenter?lang=en-US&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 12:49:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125883#M132875</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2019-04-10T12:49:41Z</dc:date>
    </item>
    <item>
      <title>Note the code is non</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125884#M132876</link>
      <description>&lt;P&gt;Note the code is non-conforming.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The standard requires that "If an internal file has been specified, an input/output list item shall not be in the file or associated with the file" (F2018 12.6.4.5.1p6).&amp;nbsp; In the example code, the sole input list item `s` is the internal file.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 20:09:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125884#M132876</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2019-04-10T20:09:06Z</dc:date>
    </item>
    <item>
      <title>Try:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125885#M132877</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;program write_s
    character*4 s
    s = '1234'
    write(s,'(A4)') s // 'hack'
    print *, s
end program write_s
&lt;/PRE&gt;

&lt;P&gt;Your actual code may want to concatenate '&amp;nbsp;&amp;nbsp;&amp;nbsp; '&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 20:45:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125885#M132877</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2019-04-10T20:45:25Z</dc:date>
    </item>
    <item>
      <title>Quote:IanH (Blackbelt) wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125886#M132878</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;IanH (Blackbelt) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the code is non-conforming.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The standard requires that "If an internal file has been specified, an input/output list item shall not be in the file or associated with the file" (F2018 12.6.4.5.1p6).&amp;nbsp; In the example code, the sole input list item `s` is the internal file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Ian, for the quote.&lt;/P&gt;&lt;P&gt;When I saw the program a few hours ago, I sensed that there was something wrong with having the same variable as the internal file and in the I/O list. Many compilers implement the WRITE statement with subroutine calls to the RTL; in such a call, the file variable would be intent(out), and the same variable in the I/O list would be intent(in) -- and, this would be an instance of aliased arguments, if the RTL routines were written in Fortran. I could not find the relevant part of the standard by searching with "internal file".&lt;/P&gt;&lt;P&gt;The same prohibition can be found in&amp;nbsp;&lt;STRONG&gt;9.5.3.3 Establishing a format&amp;nbsp;&lt;/STRONG&gt;of F2003 and&amp;nbsp;&lt;STRONG&gt;9.6.4.4 Establishing a format&lt;/STRONG&gt;&amp;nbsp;of F2008.&lt;/P&gt;&lt;P&gt;I wonder if there is any compiler that, with runtime checks enabled, is able to catch this error!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 23:14:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125886#M132878</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2019-04-10T23:14:00Z</dc:date>
    </item>
    <item>
      <title>Thanks all for the reply. 2</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125887#M132879</link>
      <description>&lt;P&gt;Thanks all for the reply. 2 remarks:&lt;/P&gt;&lt;P&gt;- Previously the compiler managed to handle it as I described. Why did it change? Did Intel changed it to comply?&lt;/P&gt;&lt;P&gt;- It's hard to find this code in more then 100000 lines of Fortran. That's why I can't use Jim's trick while it works. I don't know at the first place why this code was used because at the best nothing will happen! So I dropped it at the spot where I found it. My concern: Is this used more?&lt;/P&gt;&lt;P&gt;Thanks again for the help.&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 05:47:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125887#M132879</guid>
      <dc:creator>Annegarn__Paul</dc:creator>
      <dc:date>2019-04-11T05:47:09Z</dc:date>
    </item>
    <item>
      <title>I found one way of locating a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125888#M132880</link>
      <description>&lt;P&gt;I found one way of locating a source line in a Fortran program in which an internal file is also a member of the I/O list. Depending on how badly you wish to fix this problem, it may be worth trying.&lt;/P&gt;&lt;P&gt;The Lahey Fortran 90 compiler produces a cross-reference listing if asked. In the listing file generated, look for lines containing CHARACTER followed by the pattern &lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt;&lt;EM&gt;decimal-number&lt;/EM&gt;&lt;STRONG&gt;&amp;gt;o&lt;/STRONG&gt; . Note the second line in the LF90 cross-reference listing for your test program (with a couple of changes that I made):&lt;/P&gt;
&lt;PRE class="brush:bash; class-name:dark;"&gt;I (INTEGER)           scalar                      3s     6=     6u     6u     6u
S (CHARACTER)         scalar                      2s     5o     5o     5o     5o     6r
SILLY                 Procedure                   1s
T (CHARACTER)         scalar                      2s&lt;/PRE&gt;

&lt;P&gt;Running the listing file through the Cygwin utility &lt;STRONG&gt;grep&lt;/STRONG&gt;&amp;nbsp;with the command&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;"&gt;grep "CHARACTER.*scalar.*[0-9]o " silly.lst&lt;/PRE&gt;

&lt;P&gt;catches this line (and other lines where a character variable is used as an output list item. You could do a similar search for internal READs.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 11:13:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125888#M132880</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2019-04-11T11:13:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Annegarn, Paul wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125889#M132881</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Annegarn, Paul wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all for the reply. 2 remarks:&lt;/P&gt;&lt;P&gt;- Previously the compiler managed to handle it as I described. Why did it change? Did Intel changed it to comply?&lt;/P&gt;&lt;P&gt;- It's hard to find this code in more then 100000 lines of Fortran. That's why I can't use Jim's trick while it works. I don't know at the first place why this code was used because at the best nothing will happen! So I dropped it at the spot where I found it. My concern: Is this used more?&lt;/P&gt;&lt;P&gt;Thanks again for the help.&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Paul,&lt;/P&gt;&lt;P&gt;I still suggest you submit a support request with Intel OSC:&amp;nbsp;https://supporttickets.intel.com/servicecenter?lang=en-US&amp;nbsp; You can inquire of Intel Fortran team's plans re: the situation you show in the original post with an internal file.&amp;nbsp; Previous versions of Intel Fortran compiler supported your use case for which there&amp;nbsp;is not a constraint and a prohibition in the standard.&amp;nbsp; In response to your request, Intel Fortran team might be able to flag the offending internal file IO as a compile-time warning (say with /warn:xx) or raise a run-time exception, say when /check:xx is in effect as opposed to the current situation where no warnings or errors appear to be used and the run-time is undefined behavior, none of which meets the "spirit" of a commercial product.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 12:58:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125889#M132881</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2019-04-11T12:58:34Z</dc:date>
    </item>
    <item>
      <title>Thanks for the idea. I'm</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125890#M132882</link>
      <description>&lt;P&gt;Thanks for the idea. I'm using Visual Studio with Intel parallel composer. However I might do something simular with a regular expression.&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 13:22:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Write-statement-operates-differently-with-compiler-XE2019/m-p/1125890#M132882</guid>
      <dc:creator>Annegarn__Paul</dc:creator>
      <dc:date>2019-04-11T13:22:59Z</dc:date>
    </item>
  </channel>
</rss>

