<?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: Another bug with IMPORT and SELECT RANK in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610151#M172759</link>
    <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/66560"&gt;@andrew_4619&lt;/a&gt;&amp;nbsp;See this thread:&amp;nbsp;&lt;A href="https://community.intel.com/t5/Intel-Fortran-Compiler/scope-of-implicit-none-in-interface-block/td-p/1166006" target="_blank"&gt;scope of implicit none in interface block? - Intel Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2024 00:27:25 GMT</pubDate>
    <dc:creator>OP1</dc:creator>
    <dc:date>2024-06-27T00:27:25Z</dc:date>
    <item>
      <title>Another bug with IMPORT and SELECT RANK</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610088#M172751</link>
      <description>&lt;P&gt;Those posts are turning into an unhealthy obsession with IMPORT these days! A colleague stumbled on the following, which clearly is a compiler bug.&lt;/P&gt;&lt;P&gt;When compiled (as is), the compiler (2024.1.0, both ifx or ifort) returns the message "error #6606: The block construct names must match, and they do not. [SRNK1]"&lt;/P&gt;&lt;P&gt;They DO match, haha.&lt;/P&gt;&lt;P&gt;The code shows how to make that bug go away, and oddly it involves IMPORT again - maybe there is something more serious lurking behind the scenes here as this seems completely unrelated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;MODULE M
IMPLICIT NONE (TYPE, EXTERNAL)
INTEGER, PARAMETER :: I4 = SELECTED_INT_KIND(9)
INTERFACE
    MODULE SUBROUTINE SUB_M(A) 
        IMPORT, ONLY : I4 
        IMPLICIT NONE (TYPE, EXTERNAL)
        INTEGER(KIND = I4), INTENT(IN) :: A(..)
    END SUBROUTINE
END INTERFACE
END MODULE M




SUBMODULE (M) SUB_M
IMPORT, ALL
IMPLICIT NONE (TYPE, EXTERNAL)
CONTAINS

MODULE SUBROUTINE SUB_M(A) 
! Will compile if you comment the IMPORT, ONLY statement
! and define I4 locally after IMPLICIT NONE (by uncommenting).
! Will also compile if you comment out the select rank block SRNK1.
IMPORT, ONLY : I4 
IMPLICIT NONE (TYPE, EXTERNAL)
!INTEGER, PARAMETER :: I4 = SELECTED_INT_KIND(9)
INTEGER(KIND = I4), INTENT(IN) :: A(..)
            
SRNK1: SELECT RANK (A)
    RANK (*)
END SELECT SRNK1
            
END SUBROUTINE SUB_M
END SUBMODULE SUB_M&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 19:42:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610088#M172751</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2024-06-26T19:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Another bug with IMPORT and SELECT RANK</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610109#M172752</link>
      <description>&lt;P&gt;Please test with &lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit-download.html" target="_self"&gt;ifx 2024.2&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;It has been fixed in that version.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 21:44:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610109#M172752</guid>
      <dc:creator>Devorah_H_Intel</dc:creator>
      <dc:date>2024-06-26T21:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Another bug with IMPORT and SELECT RANK</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610118#M172754</link>
      <description>&lt;P&gt;Why are the redundant&amp;nbsp;&lt;SPAN class=""&gt;IMPLICIT NONE&lt;/SPAN&gt; &lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;TYPE&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;EXTERNAL&lt;/SPAN&gt;&lt;SPAN class=""&gt;) lines in the routines when it is already module wide?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 22:14:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610118#M172754</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2024-06-26T22:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Another bug with IMPORT and SELECT RANK</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610151#M172759</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/66560"&gt;@andrew_4619&lt;/a&gt;&amp;nbsp;See this thread:&amp;nbsp;&lt;A href="https://community.intel.com/t5/Intel-Fortran-Compiler/scope-of-implicit-none-in-interface-block/td-p/1166006" target="_blank"&gt;scope of implicit none in interface block? - Intel Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 00:27:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610151#M172759</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2024-06-27T00:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Another bug with IMPORT and SELECT RANK</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610227#M172764</link>
      <description>&lt;P&gt;Interfaces wasn't part of my point. The implicit statement at line&amp;nbsp; 26 above is redundant as the one at line 18 applies in all the routines in that submodule and given the declaration in the implementation is checked&amp;nbsp; against the interface&amp;nbsp; then in effect to applies within the interface also!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 05:40:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610227#M172764</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2024-06-27T05:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Another bug with IMPORT and SELECT RANK</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610379#M172773</link>
      <description>&lt;P&gt;Your comment regarding the unnecessary duplication of the IMPLICIT NONE statement is correct, technically (because IMPLICIT NONE is the desired behavior for both module and contained procedure in the original post's code), but note that in general a contained procedure can still have its own IMPLICIT statement(s). Consider the example shown below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;MODULE M
CONTAINS
    SUBROUTINE S1(I)
    !IMPLICIT REAL (I)  ! This line needs to be uncommented for
                        ! the code to compile.
    WRITE(*, *) I
    END SUBROUTINE S1
END MODULE M

PROGRAM P
USE M
IMPLICIT NONE (TYPE, EXTERNAL)
REAL :: I
CALL S1(I)
END PROGRAM P&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Our policy is to avoid having to finesse those IMPORT statements and not try to be clever with them. We require those IMPORT statements everywhere they are allowed - for peace of mind. It seems this is also your strategy, in this thread (&lt;A href="https://community.intel.com/t5/Intel-Fortran-Compiler/The-IMPLICIT-NONE-issue-drags-on/td-p/1109569" target="_blank" rel="noopener"&gt;https://community.intel.com/t5/Intel-Fortran-Compiler/The-IMPLICIT-NONE-issue-drags-on/td-p/1109569&lt;/A&gt; ) you posted:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/66560"&gt;@andrew_4619&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;From a personal point of view I put implicit none absolutely everywhere often in a redundant way and that way I feel happy that my trousers will not fall down as I have both belt and braces.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 27 Jun 2024 14:06:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-bug-with-IMPORT-and-SELECT-RANK/m-p/1610379#M172773</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2024-06-27T14:06:35Z</dc:date>
    </item>
  </channel>
</rss>

