<?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 Simplification of FINDLOC with array of size 0 fails in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1416064#M162835</link>
    <description>&lt;P&gt;The following code is rejected by ifort &lt;SPAN&gt;2021.6.0:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;program p
! integer, parameter :: ii(1) = findloc ([integer::1],1) ! works
  integer, parameter :: ii(1) = findloc ([integer:: ],1) ! fails
  print *, ii
  print *, findloc ([integer::],1) ! accepted
end
&lt;/LI-CODE&gt;
&lt;P&gt;This gives:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;% ifort ifort-findloc.f90
ifort-findloc.f90(3): error #6821: A scalar constant is required in this context.
  integer, parameter :: ii(1) = findloc ([integer:: ],1) ! fails
--------------------------------^
compilation aborted for ifort-findloc.f90 (code 1)
&lt;/LI-CODE&gt;
&lt;P&gt;It shouldn't be too hard to do the simplification...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2022 21:29:44 GMT</pubDate>
    <dc:creator>Harald1</dc:creator>
    <dc:date>2022-09-20T21:29:44Z</dc:date>
    <item>
      <title>Simplification of FINDLOC with array of size 0 fails</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1416064#M162835</link>
      <description>&lt;P&gt;The following code is rejected by ifort &lt;SPAN&gt;2021.6.0:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;program p
! integer, parameter :: ii(1) = findloc ([integer::1],1) ! works
  integer, parameter :: ii(1) = findloc ([integer:: ],1) ! fails
  print *, ii
  print *, findloc ([integer::],1) ! accepted
end
&lt;/LI-CODE&gt;
&lt;P&gt;This gives:&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;% ifort ifort-findloc.f90
ifort-findloc.f90(3): error #6821: A scalar constant is required in this context.
  integer, parameter :: ii(1) = findloc ([integer:: ],1) ! fails
--------------------------------^
compilation aborted for ifort-findloc.f90 (code 1)
&lt;/LI-CODE&gt;
&lt;P&gt;It shouldn't be too hard to do the simplification...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 21:29:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1416064#M162835</guid>
      <dc:creator>Harald1</dc:creator>
      <dc:date>2022-09-20T21:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Simplification of FINDLOC with array of size 0 fails</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1416512#M162879</link>
      <description>&lt;P&gt;I'd argue that this is a compiler bug as&lt;/P&gt;
&lt;PRE class="lia-code-sample line-numbers language-fortran"&gt;&lt;CODE&gt;findloc ([integer:: ],1)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;looks like a legitimate constant expression (according to MFE 8.4).&lt;/P&gt;
&lt;P&gt;I note also that gfortran --warn-all (MSYS2 10.2.0) compiles this without any warnings and produces the desired output.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 07:44:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1416512#M162879</guid>
      <dc:creator>Mark_Lewy</dc:creator>
      <dc:date>2022-09-22T07:44:24Z</dc:date>
    </item>
    <item>
      <title>Re:Simplification of FINDLOC with array of size 0 fails</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1416926#M162897</link>
      <description>&lt;P&gt;I filed a bug report on this erroneous error message, CMPLRIL0-34931.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Sep 2022 16:13:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1416926#M162897</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2022-09-23T16:13:10Z</dc:date>
    </item>
    <item>
      <title>Re:Simplification of FINDLOC with array of size 0 fails</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1443587#M164276</link>
      <description>&lt;P&gt;This FINDLOC() issue is resolved in the latest Fortran compilers that were released in December. Give it a try!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Jan 2023 19:48:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1443587#M164276</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-01-03T19:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Simplification of FINDLOC with array of size 0 fails</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1443614#M164280</link>
      <description>&lt;P&gt;Yes, it is fixed in the latest version.&amp;nbsp; Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 21:02:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simplification-of-FINDLOC-with-array-of-size-0-fails/m-p/1443614#M164280</guid>
      <dc:creator>Harald1</dc:creator>
      <dc:date>2023-01-03T21:02:35Z</dc:date>
    </item>
  </channel>
</rss>

