<?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 Re: Incorrect handling of EQUIVALENCE in ifx in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Incorrect-handling-of-EQUIVALENCE-in-ifx/m-p/1423404#M163213</link>
    <description>&lt;P&gt;&amp;nbsp;This was fixed in future release.&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;ifort equiv.f90 -o eq  
 $ ./eq
a  =   1.0  2.0  3.0  4.0  5.0
b  =   6.0  7.0  8.0  9.0 10.0
c  =   1.0  2.0  3.0  4.0  5.0  6.0  7.0  8.0  9.0 10.0
 $ ifx equiv.f90 -o eq  
 $ ./eq
a  =   1.0  2.0  3.0  4.0  5.0
b  =   6.0  7.0  8.0  9.0 10.0
c  =   1.0  2.0  3.0  4.0  5.0  6.0  7.0  8.0  9.0 10.0
 $
&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 19 Oct 2022 18:02:45 GMT</pubDate>
    <dc:creator>Devorah_H_Intel</dc:creator>
    <dc:date>2022-10-19T18:02:45Z</dc:date>
    <item>
      <title>Incorrect handling of EQUIVALENCE in ifx</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Incorrect-handling-of-EQUIVALENCE-in-ifx/m-p/1418623#M162989</link>
      <description>&lt;P&gt;The following example code gives incorrect results with ifx version 2022.1.0&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;PROGRAM ifx_equiv

  IMPLICIT NONE
  
  REAL :: a(5) = [1.0, 2.0, 3.0, 4.0, 5.0]
  REAL :: b(5) = [6.0, 7.0, 8.0, 9.0,10.0]
  REAL :: c(10)
  
  EQUIVALENCE (a(1), c(1))  
  EQUIVALENCE (b(1), c(6))
  
!  DATA a /1.0, 2.0, 3.0,  4.0,  5.0/
!  DATA b /6.0, 7.0, 8.0,  9.0, 10.0/
  
!  a = [1.0, 2.0, 3.0, 4.0, 5.0]
!  b = [6.0, 7.0, 8.0, 9.0,10.0]
 
  WRITE(*,'("a  = ", 5F5.1)') a
  WRITE(*,'("b  = ", 5F5.1)') b
  WRITE(*,'("c  = ", 10F5.1)') c 
  
END PROGRAM ifx_equiv&lt;/LI-CODE&gt;
&lt;P&gt;The (incorrect) output when compiled with ifx is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;a  =   1.0  2.0  3.0  4.0  5.0
b  =   0.0  0.0  0.0  0.0  0.0
c  =   1.0  2.0  3.0  4.0  5.0  0.0  0.0  0.0  0.0  0.0
&lt;/LI-CODE&gt;
&lt;P&gt;The (correct) output when compiled with ifort or gfortran is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;a  =   1.0  2.0  3.0  4.0  5.0
b  =   6.0  7.0  8.0  9.0 10.0
c  =   1.0  2.0  3.0  4.0  5.0  6.0  7.0  8.0  9.0 10.0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;If you replace the default initialization of the arrays with the commented out DATA statements the same error occurs. However, if you explicitly initialize the arrays, as in the commented out lines 15 and 16, then the error does not occur.&lt;/P&gt;
&lt;P&gt;This looks to me like an ifx compiler bug.&lt;/P&gt;
&lt;P&gt;I realize that EQUIVALENCE is an obsolete language feature which can be unsafe and should be avoided. This minimum example is based on a legacy routine in a production code which was found to give incorrect results with the ifx compiler as a consequence of this error.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 10:16:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Incorrect-handling-of-EQUIVALENCE-in-ifx/m-p/1418623#M162989</guid>
      <dc:creator>Simon_Richards</dc:creator>
      <dc:date>2022-09-30T10:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect handling of EQUIVALENCE in ifx</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Incorrect-handling-of-EQUIVALENCE-in-ifx/m-p/1418657#M162990</link>
      <description>&lt;P&gt;Still fails in ifx 2022.2.0.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 13:16:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Incorrect-handling-of-EQUIVALENCE-in-ifx/m-p/1418657#M162990</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2022-09-30T13:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect handling of EQUIVALENCE in ifx</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Incorrect-handling-of-EQUIVALENCE-in-ifx/m-p/1418719#M162991</link>
      <description>&lt;P&gt;We'll get a bug report on this.&amp;nbsp; Thanks for catching it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 16:35:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Incorrect-handling-of-EQUIVALENCE-in-ifx/m-p/1418719#M162991</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2022-09-30T16:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect handling of EQUIVALENCE in ifx</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Incorrect-handling-of-EQUIVALENCE-in-ifx/m-p/1423404#M163213</link>
      <description>&lt;P&gt;&amp;nbsp;This was fixed in future release.&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;ifort equiv.f90 -o eq  
 $ ./eq
a  =   1.0  2.0  3.0  4.0  5.0
b  =   6.0  7.0  8.0  9.0 10.0
c  =   1.0  2.0  3.0  4.0  5.0  6.0  7.0  8.0  9.0 10.0
 $ ifx equiv.f90 -o eq  
 $ ./eq
a  =   1.0  2.0  3.0  4.0  5.0
b  =   6.0  7.0  8.0  9.0 10.0
c  =   1.0  2.0  3.0  4.0  5.0  6.0  7.0  8.0  9.0 10.0
 $
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 19 Oct 2022 18:02:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Incorrect-handling-of-EQUIVALENCE-in-ifx/m-p/1423404#M163213</guid>
      <dc:creator>Devorah_H_Intel</dc:creator>
      <dc:date>2022-10-19T18:02:45Z</dc:date>
    </item>
  </channel>
</rss>

