<?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 Compiler bug involving complex array parts in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695097#M176004</link>
    <description>&lt;P&gt;I've encountered another bug with complex array parts using ifx 2025.1.&amp;nbsp; Here's a small example.&amp;nbsp; I'll follow-up with a couple workaround attempts that result in either an internal compiler error or incorrect runtime results. The only workaround I've found that works is to manually do copy-in/copy-out to a temporary real array.&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;type :: foo
  complex :: z(3)
end type
type(foo) :: a
call bar(a%z%re)
contains
  subroutine bar(x)
    real, intent(inout) :: x(:)
  end subroutine
end&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The compiler gives this spurious error. Clearly the actual argument is neither a constant nor an expression.&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ ifx bug.f90 
bug.f90(5): error #6638: An actual argument is an expression or constant; this is not valid since the associated dummy argument has the explicit INTENT(OUT) or INTENT(INOUT) attribute.
call bar(a%z%re)
---------^
compilation aborted for bug.f90 (code 1)&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 05 Jun 2025 15:24:02 GMT</pubDate>
    <dc:creator>NCarlson</dc:creator>
    <dc:date>2025-06-05T15:24:02Z</dc:date>
    <item>
      <title>Compiler bug involving complex array parts</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695097#M176004</link>
      <description>&lt;P&gt;I've encountered another bug with complex array parts using ifx 2025.1.&amp;nbsp; Here's a small example.&amp;nbsp; I'll follow-up with a couple workaround attempts that result in either an internal compiler error or incorrect runtime results. The only workaround I've found that works is to manually do copy-in/copy-out to a temporary real array.&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;type :: foo
  complex :: z(3)
end type
type(foo) :: a
call bar(a%z%re)
contains
  subroutine bar(x)
    real, intent(inout) :: x(:)
  end subroutine
end&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The compiler gives this spurious error. Clearly the actual argument is neither a constant nor an expression.&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ ifx bug.f90 
bug.f90(5): error #6638: An actual argument is an expression or constant; this is not valid since the associated dummy argument has the explicit INTENT(OUT) or INTENT(INOUT) attribute.
call bar(a%z%re)
---------^
compilation aborted for bug.f90 (code 1)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Jun 2025 15:24:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695097#M176004</guid>
      <dc:creator>NCarlson</dc:creator>
      <dc:date>2025-06-05T15:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler bug involving complex array parts</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695100#M176005</link>
      <description>&lt;P&gt;This attempt at a workaround using an ASSOCIATE block results in an internal compiler error:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;type :: foo
  complex :: z(3)
end type
type(foo) :: a
associate (z =&amp;gt; a%z)
  call bar(z%re)
end associate
contains
  subroutine bar(x)
    real, intent(inout) :: x(:)
  end subroutine
end&lt;/LI-CODE&gt;&lt;LI-CODE lang="none"&gt;$ ifx bug.f90
          #0 0x0000000003310581
          #1 0x0000000003375357
         [...]
         #28 0x00007fce2f76b20b __libc_start_main + 139
         #29 0x000000000308f0ee

bug.f90(6): error #5623: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
  call bar(z%re)
-----------^
compilation aborted for bug.f90 (code 3)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 15:27:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695100#M176005</guid>
      <dc:creator>NCarlson</dc:creator>
      <dc:date>2025-06-05T15:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler bug involving complex array parts</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695102#M176006</link>
      <description>&lt;P&gt;This attempt at a workaround using an ASSOCIATE block compiles without error, but produces incorrect results:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;type :: foo
  complex :: z(3)
end type
type(foo) :: a
a%z%re = -1
associate (z_re =&amp;gt; a%z%re)
  call bar(z_re)
end associate
print *, a%z%re
if (any(a%z%re /= [1,2,3])) stop 'fail'
contains
  subroutine bar(x)
    real, intent(inout) :: x(:)
    x = [1,2,3]
  end subroutine
end&lt;/LI-CODE&gt;&lt;LI-CODE lang="none"&gt;$ ifx bug.f90
$ ./a.out
  -1.000000      -1.000000      -1.000000    
fail&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Jun 2025 15:30:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695102#M176006</guid>
      <dc:creator>NCarlson</dc:creator>
      <dc:date>2025-06-05T15:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler bug involving complex array parts</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695116#M176007</link>
      <description>&lt;P&gt;Here's the more complete test code from my compiler bug database that should compile and run with a 0 exit status (unix).&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 16:08:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695116#M176007</guid>
      <dc:creator>NCarlson</dc:creator>
      <dc:date>2025-06-05T16:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler bug involving complex array parts</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695863#M176023</link>
      <description>&lt;P&gt;TYPE :: FOO&lt;BR /&gt;&amp;nbsp; &amp;nbsp;COMPLEX :: Z(3)&lt;BR /&gt;END TYPE&lt;BR /&gt;TYPE(FOO) :: A&lt;BR /&gt;CALL BAR(REAL(A.Z(:)))&lt;BR /&gt;CONTAINS&lt;BR /&gt;&amp;nbsp; SUBROUTINE BAR(X)&lt;BR /&gt;&amp;nbsp; REAL, INTENT(IN) :: X(:)&lt;BR /&gt;&amp;nbsp; WRITE(*,*)X&lt;BR /&gt;&amp;nbsp; END SUBROUTINE&lt;BR /&gt;END&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 18:11:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1695863#M176023</guid>
      <dc:creator>garraleta_fortran</dc:creator>
      <dc:date>2025-06-09T18:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler bug involving complex array parts</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1696120#M176033</link>
      <description>&lt;P&gt;Thank you for reporting this. This bug report is escalated to engineering for further investigation.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 12:36:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-bug-involving-complex-array-parts/m-p/1696120#M176033</guid>
      <dc:creator>Devorah_H_Intel</dc:creator>
      <dc:date>2025-06-10T12:36:53Z</dc:date>
    </item>
  </channel>
</rss>

