<?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: Bug with user defined assignment in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376620#M160959</link>
    <description>&lt;P&gt;I vaguely remember asking here if having the same name for a submodule and a contained procedure in that submodule was an issue and was told that it was acceptable. I actually like this 'feature'. When following a one-procedure-per-submodule coding style it helps avoid the problem of figuring out a new name for the submodule (a nice thing when you have 1000s upon 1000s of procedures).&lt;/P&gt;</description>
    <pubDate>Tue, 12 Apr 2022 20:42:54 GMT</pubDate>
    <dc:creator>OP1</dc:creator>
    <dc:date>2022-04-12T20:42:54Z</dc:date>
    <item>
      <title>Bug with user defined assignment</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376604#M160957</link>
      <description>&lt;P&gt;Unless there is some obscure part of the standard that escapes me, I believe that this is a bug:&lt;/P&gt;
&lt;P&gt;In the code below, compiled with the latest ifort classic 2021.5.0 compiler, the PRIVATE statement in the module M is not honored in the USE statement of the main program. The whole thing compiles just fine when a compile-time error should be issued.&lt;/P&gt;
&lt;P&gt;Note: I observed that this problem does not exist with user-defined operators; only with user defined assignment.&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;MODULE M
IMPLICIT NONE (TYPE, EXTERNAL)
PRIVATE
INTERFACE ASSIGNMENT(=)
    MODULE SUBROUTINE F(S, I)
    IMPLICIT NONE (TYPE, EXTERNAL)
    INTEGER, INTENT(IN) :: I
    CHARACTER(LEN = 15), INTENT(OUT) :: S
    END SUBROUTINE F
END INTERFACE
END MODULE M

SUBMODULE (M) F
IMPLICIT NONE (TYPE, EXTERNAL)
CONTAINS
    MODULE SUBROUTINE F(S, I)
    IMPLICIT NONE (TYPE, EXTERNAL)
    INTEGER, INTENT(IN) :: I
    CHARACTER(LEN = 15), INTENT(OUT) :: S
    WRITE(S, '(I15)') I
    END SUBROUTINE F
END SUBMODULE F

PROGRAM P
USE M, ONLY : ASSIGNMENT(=)
CHARACTER(LEN = 15) :: S
S = 1
END PROGRAM P&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Apr 2022 18:59:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376604#M160957</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2022-04-12T18:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with user defined assignment</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376610#M160958</link>
      <description>&lt;P&gt;For whatever it's worth, I agree the issue with PRIVATE in relation to ASSIGNMENT is a bug in Intel Fortran.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Intel staff: please note there is another issue in Intel Fortran as well that will be worth your Fortran team's attention: the use of `F` as submodule identifier that is global in relation to the module subprogram identifier too as `F'.&amp;nbsp; That does not conform to the standard, if I am not mistaken.&amp;nbsp; Here it will be good if Intel Fortran can diagnose this even if the standard may not require it (I'll need to check) i.e., Intel Fortran users will benefit greatly from an error/warning here.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 19:26:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376610#M160958</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2022-04-12T19:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with user defined assignment</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376620#M160959</link>
      <description>&lt;P&gt;I vaguely remember asking here if having the same name for a submodule and a contained procedure in that submodule was an issue and was told that it was acceptable. I actually like this 'feature'. When following a one-procedure-per-submodule coding style it helps avoid the problem of figuring out a new name for the submodule (a nice thing when you have 1000s upon 1000s of procedures).&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 20:42:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376620#M160959</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2022-04-12T20:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with user defined assignment</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376631#M160960</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/92920"&gt;@FortranFan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Intel staff: please note there is another issue in Intel Fortran as well that will be worth your Fortran team's attention: the use of `F` as submodule identifier that is global in relation to the module subprogram identifier too as `F'.&amp;nbsp; That does not conform to the standard, if I am not mistaken.&amp;nbsp; Here it will be good if Intel Fortran can diagnose this even if the standard may not require it (I'll need to check) i.e., Intel Fortran users will benefit greatly from an error/warning here.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This practice conforms to the standard.&amp;nbsp; See F2018 14.2.3p2.&amp;nbsp; The identifier for a submodule is the combination of the ancestor module and the submodule name, a submodule name on its own is not a global or local identifier.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 22:25:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376631#M160960</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2022-04-12T22:25:04Z</dc:date>
    </item>
    <item>
      <title>Re:Bug with user defined assignment</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376675#M160961</link>
      <description>&lt;P&gt;Thank you for bringing this to the Forum.&lt;/P&gt;&lt;P&gt;Bug ID is CMPLRLLVM-36847&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Apr 2022 00:48:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1376675#M160961</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2022-04-13T00:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Bug with user defined assignment</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1635022#M173847</link>
      <description>&lt;P&gt;This issue was fixed and the fix will be available in the 2025.1 ifx release.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 22:46:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-user-defined-assignment/m-p/1635022#M173847</guid>
      <dc:creator>Devorah_H_Intel</dc:creator>
      <dc:date>2024-10-03T22:46:30Z</dc:date>
    </item>
  </channel>
</rss>

