<?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>tema Re: Possible Fortran Standards Violation in ifx 2025.3 en Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1738731#M178411</link>
    <description>&lt;P&gt;The "simple" test is too simple. In order to show the issue, the type PCM must be host-associated. For example:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;type :: PCM
   integer :: a
end type PCM
contains
subroutine test
type(PCM) :: PCM
end subroutine test
end&lt;/LI-CODE&gt;&lt;P&gt;F2023 19.3.1 (Classes of local identifiers) provides four classes of local identifiers, with named variables and nonintrinsic types both being class 1. Paragraph 3 then says:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Within its scope, a local identifier of one class shall not be the same as another local identifier of the same class, except that a generic name may be the same as the name of a procedure as explained in 15.4.3.4 or the same as&amp;nbsp;the name of a derived type (7.5.10). A local identifier of one class may be the same as a local identifier of another&amp;nbsp;class.&lt;/P&gt;&lt;P&gt;In your original example with the define, and my reduced example, "PCM" is both a named variable and a nonintrinsic type, so it's not allowed for these to share a name. Host association and use association are somewhat different in effect, but here the compiler should be looking for any accessible definition of "PCM" to detect a conflict.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Feb 2026 18:35:54 GMT</pubDate>
    <dc:creator>Steve_Lionel</dc:creator>
    <dc:date>2026-02-26T18:35:54Z</dc:date>
    <item>
      <title>Possible Fortran Standards Violation in ifx 2025.3</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1738576#M178401</link>
      <description>&lt;P&gt;This is an odd one. I have a code that ifx compiles when as far as I (and NAG Fortran and Flang) can tell, it should not. Here is a reproducer:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;module Recon1d_PCM
   type PCM
      real :: a
   end type PCM
end module Recon1d_PCM

module MOM_remapping2

#ifdef DECLARE_IN_MODULE
use Recon1d_PCM, only : PCM
#endif
implicit none ; private

public remapping_unit_tests

contains

logical function remapping_unit_tests()
#ifndef DECLARE_IN_MODULE
   use Recon1d_PCM, only : PCM
#endif
   type(PCM) :: PCM
end function remapping_unit_tests

end module MOM_remapping2&lt;/LI-CODE&gt;&lt;P&gt;In the end this code is doing:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;type(PCM) :: PCM&lt;/LI-CODE&gt;&lt;P&gt;which should not be allowed in Fortran. And most small reproducers you can make would fail. But ifx (and gfortran) allow this if the PCM use is done at the module level as seen above.&lt;BR /&gt;&lt;BR /&gt;For example, if you save the above code as "repro_typeconflict.F90":&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;&amp;gt; ifx --version
ifx (IFX) 2025.3.0 20251010
Copyright (C) 1985-2025 Intel Corporation. All rights reserved.

&amp;gt; ifx repro_typeconflict.F90
repro_typeconflict.F90(22): error #6401: The attributes of this name conflict with those made accessible by a USE statement.   [PCM]
   type(PCM) :: PCM
----------------^
repro_typeconflict.F90(18): warning #6178: The return value of this FUNCTION has not been defined.   [REMAPPING_UNIT_TESTS]
logical function remapping_unit_tests()
-----------------^
compilation aborted for repro_typeconflict.F90 (code 1)

&amp;gt; ifx -DDECLARE_IN_MODULE repro_typeconflict.F90
repro_typeconflict.F90(18): warning #6178: The return value of this FUNCTION has not been defined.   [REMAPPING_UNIT_TESTS]
logical function remapping_unit_tests()
-----------------^
/ford1/share/gmao_SIteam/intel/oneapi/2025/compiler/2025.3/lib/for_main.o: In function `main':
for_main.c:(.text+0x19): undefined reference to `MAIN__'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;As you can see, without the "-DDECLARE_IN_MODULE" ifx is not happy. With it, it is fine. gcc 15.2 is the same.&lt;BR /&gt;&lt;BR /&gt;NAG Fortran is not happy either way:&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;&amp;gt; nagfor -fpp -DDECLARE_IN_MODULE repro_typeconflict.F90
NAG Fortran Compiler Release 7.2(Shin-Urayasu) Build 7236
Error: repro_typeconflict.F90, line 22: Redeclaration of symbol PCM from USEd module RECON1D_PCM
       detected at PCM@&amp;lt;end-of-statement&amp;gt;
Error: repro_typeconflict.F90, line 22: Data type given to inappropriate symbol PCM
       detected at PCM@&amp;lt;end-of-statement&amp;gt;
Warning: repro_typeconflict.F90, line 23: Function REMAPPING_UNIT_TESTS has not been assigned a value
[NAG Fortran Compiler pass 1 error termination, 2 errors, 1 warning]

&amp;gt; nagfor -fpp repro_typeconflict.F90
NAG Fortran Compiler Release 7.2(Shin-Urayasu) Build 7236
Error: repro_typeconflict.F90, line 22: Redeclaration of symbol PCM from USEd module RECON1D_PCM
       detected at PCM@&amp;lt;end-of-statement&amp;gt;
Error: repro_typeconflict.F90, line 22: Data type given to inappropriate symbol PCM
       detected at PCM@&amp;lt;end-of-statement&amp;gt;
Warning: repro_typeconflict.F90, line 23: Function REMAPPING_UNIT_TESTS has not been assigned a value
[NAG Fortran Compiler pass 1 error termination, 2 errors, 1 warning]&lt;/LI-CODE&gt;&lt;P&gt;And neither is flang:&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;&amp;gt; flang --version
flang version 22.1.0-rc3 (git@github.com:GEOS-ESM/build-llvm-flang.git 4b7685b9b8f0da358165f3a32d0c486fbed137ea)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /ford1/share/gmao_SIteam/llvm-flang/22.1.0-rc3/bin

&amp;gt; flang  repro_typeconflict.F90
error: Semantic errors in repro_typeconflict.F90
./repro_typeconflict.F90:22:17: error: 'pcm' is use-associated from module 'recon1d_pcm' and cannot be re-declared
     type(PCM) :: PCM
                  ^^^
&amp;gt; flang -DDECLARE_IN_MODULE repro_typeconflict.F90
error: Semantic errors in repro_typeconflict.F90
./repro_typeconflict.F90:22:9: error: 'pcm' from host is not accessible
     type(PCM) :: PCM
          ^^^
./repro_typeconflict.F90:22:17: because: 'pcm' is hidden by this entity
     type(PCM) :: PCM
                  ^^^&lt;/LI-CODE&gt;&lt;P&gt;though it is unhappy in slightly different ways.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 16:03:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1738576#M178401</guid>
      <dc:creator>Matt_Thompson</dc:creator>
      <dc:date>2026-02-25T16:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Possible Fortran Standards Violation in ifx 2025.3</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1738578#M178402</link>
      <description>&lt;P&gt;Also, here is the "simple" test:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;type :: PCM
   integer :: a
end type PCM

type(PCM) :: PCM

end&lt;/LI-CODE&gt;&lt;P&gt;and ifx does not like it:&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;&amp;gt; ifx test.F90
test.F90(5): error #6406: Conflicting attributes or multiple declaration of name.   [PCM]
type(PCM) :: PCM
-------------^
compilation aborted for test.F90 (code 1)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 Feb 2026 16:07:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1738578#M178402</guid>
      <dc:creator>Matt_Thompson</dc:creator>
      <dc:date>2026-02-25T16:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Possible Fortran Standards Violation in ifx 2025.3</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1738731#M178411</link>
      <description>&lt;P&gt;The "simple" test is too simple. In order to show the issue, the type PCM must be host-associated. For example:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;type :: PCM
   integer :: a
end type PCM
contains
subroutine test
type(PCM) :: PCM
end subroutine test
end&lt;/LI-CODE&gt;&lt;P&gt;F2023 19.3.1 (Classes of local identifiers) provides four classes of local identifiers, with named variables and nonintrinsic types both being class 1. Paragraph 3 then says:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Within its scope, a local identifier of one class shall not be the same as another local identifier of the same class, except that a generic name may be the same as the name of a procedure as explained in 15.4.3.4 or the same as&amp;nbsp;the name of a derived type (7.5.10). A local identifier of one class may be the same as a local identifier of another&amp;nbsp;class.&lt;/P&gt;&lt;P&gt;In your original example with the define, and my reduced example, "PCM" is both a named variable and a nonintrinsic type, so it's not allowed for these to share a name. Host association and use association are somewhat different in effect, but here the compiler should be looking for any accessible definition of "PCM" to detect a conflict.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2026 18:35:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1738731#M178411</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2026-02-26T18:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Possible Fortran Standards Violation in ifx 2025.3</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1739738#M178454</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/5442"&gt;@Steve_Lionel&lt;/a&gt;&amp;nbsp; Thanks for the clarification. (And sorry for the late reply, Outlook decided recently all Intel Forum posts are junk...along with some other email replies I'd been waiting for. :/)&lt;BR /&gt;&lt;BR /&gt;Your reproducer code seems to "work" for me as in I assume it should fail and does not.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 14:58:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1739738#M178454</guid>
      <dc:creator>Matt_Thompson</dc:creator>
      <dc:date>2026-03-05T14:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Possible Fortran Standards Violation in ifx 2025.3</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1739740#M178455</link>
      <description>&lt;P&gt;Correct.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 15:11:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1739740#M178455</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2026-03-05T15:11:18Z</dc:date>
    </item>
    <item>
      <title>Re:Possible Fortran Standards Violation in ifx 2025.3</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1741036#M178541</link>
      <description>&lt;P&gt;Escalated to Intel Fortran developers (CMPLRLLVM-74140). Thank you for brining it to our attention.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Mar 2026 15:39:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Possible-Fortran-Standards-Violation-in-ifx-2025-3/m-p/1741036#M178541</guid>
      <dc:creator>Igor_V_Intel</dc:creator>
      <dc:date>2026-03-16T15:39:32Z</dc:date>
    </item>
  </channel>
</rss>

