<?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: Re:ifort gets confused with procedure names in conjunction with submodules in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470558#M165734</link>
    <description>&lt;P&gt;Thanks for checking.&lt;/P&gt;
&lt;P&gt;It is actually an old bug, which I also get with an older ifort version. Meanwhile I also saw (with another real code case) that an abstract derived-type in the main module (as in the example) is not necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2023 05:22:02 GMT</pubDate>
    <dc:creator>martinmath</dc:creator>
    <dc:date>2023-03-28T05:22:02Z</dc:date>
    <item>
      <title>ifort gets confused with procedure names in conjunction with submodules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1469313#M165676</link>
      <description>&lt;P&gt;The small example below shows what look like a compiler bug, occurring with current versions ifx 2023.0.0 20221201 as well as ifort 2021.8.0 20221119.&lt;/P&gt;
&lt;P&gt;Compilation with "ifort submod_aux.f90 submod_class.f90 submod_class_smod.f90 -c" (or ifx) gives the error message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;submod_class_smod.f90: error #8262: For a type-bound procedure that has the PASS binding attribute, the first dummy argument must have the same declared type as the type being defined.   [SELF]

submod_class_smod.f90(6): error #8278: An overriding binding and its corresponding overridden binding must have the same number of dummy arguments.   [SUB]
   procedure :: sub
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and some more.&lt;/P&gt;
&lt;P&gt;In the example there is an auxiliary module submod_aux providing a derived-type "aux" with type-bound procedure sub. The subroutine "sub" itself is private.&lt;/P&gt;
&lt;P&gt;Furthermore, there is a module submod_class.f90, defining an abstract type "t", providing only the interface of t. An implementation for "t" is provided in the submodule with extended type "s", which is not exported by module t. Type "t" has a type-bound procedure of name "sub" (deferred) which is implemented by "s". It has an argument of type "aux". Somehow, the compiler confuses the subroutine "sub" from the submodule and the subroutine of same name from auxiliary module, which is demonstrated by the following work-around.&lt;/P&gt;
&lt;P&gt;Work-around: rename subroutine "sub" in the submodule to "sub_s" and declare type-bound procedure with "procedure :: sub =&amp;gt; sub_s".&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 submod_aux

implicit none
private

type, public :: aux
   integer :: i = 42
contains
   procedure :: sub
end type aux

contains

subroutine sub(self)
   class(aux), intent(out) :: self
   self%i = 43
end subroutine sub

end module submod_aux&lt;/LI-CODE&gt;&lt;LI-CODE lang="fortran"&gt;module submod_class

use submod_aux
implicit none
private

public create

type, abstract, public :: t
contains
   procedure(sub_ifc), deferred :: sub
end type t

abstract interface
   subroutine sub_ifc(self, a)
      import t, aux
      class(t), intent(out) :: self
      class(aux), intent(in) :: a
   end subroutine sub_ifc
end interface

interface
   module function create() result(x)
      class(t), pointer :: x
   end function create
end interface

end module submod_class&lt;/LI-CODE&gt;&lt;LI-CODE lang="fortran"&gt;submodule (submod_class) submod_class_smod

type, extends(t) :: s
   integer :: i
contains
   procedure :: sub
end type s

contains

module function create() result(x)
   class(t), pointer :: x
   allocate(s :: x)
end function create

subroutine sub(self, a)
   class(s), intent(out) :: self
   class(aux), intent(in) :: a
   self%i = a%i
end subroutine sub

end submodule submod_class_smod
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: corrected description of usage of aux (it is used argument not as component).&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 10:53:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1469313#M165676</guid>
      <dc:creator>martinmath</dc:creator>
      <dc:date>2023-03-24T10:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: ifort gets confused with procedure names in conjunction with submodules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1469421#M165677</link>
      <description>&lt;P&gt;The code looks conforming to me, I reckon it's a compiler bug.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 13:12:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1469421#M165677</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2023-03-24T13:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: ifort gets confused with procedure names in conjunction with submodules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470235#M165721</link>
      <description>&lt;LI-CODE lang="bash"&gt;$ ifort --version
ifort (IFORT) 2021.8.0 20221119
Copyright (C) 1985-2022 Intel Corporation.  All rights reserved.
$ ifort -c submod_aux.f90 submod_class.f90 submod_class_smod.f90
$&lt;/LI-CODE&gt;
&lt;P&gt;I'm confused. I copy/pasted those three files. I don't get the error messages. What am I missing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 15:42:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470235#M165721</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-03-27T15:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: ifort gets confused with procedure names in conjunction with submodules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470354#M165729</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/44501"&gt;@Barbara_P_Intel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;..&lt;BR /&gt;
&lt;P&gt;.. What am I missing?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Could it be Windows OS?&lt;/P&gt;
&lt;LI-CODE lang="none"&gt;C:\temp&amp;gt;ifort /c submod_aux.f90 submod_class.f90 submod_class_smod.f90
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.8.0 Build 20221119_000000
Copyright (C) 1985-2022 Intel Corporation.  All rights reserved.

submod_class_smod.f90: error #8262: For a type-bound procedure that has the PASS binding attribute, the first dummy argument must have the same declared type as the type being defined.   [SELF]
submod_class_smod.f90(6): error #8278: An overriding binding and its corresponding overridden binding must have the same number of dummy arguments.   [SUB]
   procedure :: sub
----------------^
submod_class_smod.f90(6): error #8383: The dummy arguments of an overriding and overridden binding that correspond by position must have the same characteristics, except for the type of the passed object dummy arguments.   [SUB]
   procedure :: sub
----------------^
submod_class_smod.f90: error #8322: A deferred binding is inherited by non-abstract type; It must be overridden.   [SUB]
submod_class_smod.f90(3): error #6136: Derived-type declared must be ABSTRACT   [S]
type, extends(t) :: s
--------------------^
compilation aborted for submod_class_smod.f90 (code 1)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Mar 2023 20:32:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470354#M165729</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2023-03-27T20:32:15Z</dc:date>
    </item>
    <item>
      <title>Re:ifort gets confused with procedure names in conjunction with submodules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470364#M165730</link>
      <description>&lt;P&gt;Thanks for the sanity check, &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/92920"&gt;@FortranFan&lt;/a&gt;. What I copy/pasted compiles OK on Windows, too.&lt;/P&gt;&lt;P&gt;So I redid the copy/paste and I now get the error messages on Linux.&lt;/P&gt;&lt;P&gt;(rolling my eyes)&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Mar 2023 20:43:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470364#M165730</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-03-27T20:43:17Z</dc:date>
    </item>
    <item>
      <title>Re:ifort gets confused with procedure names in conjunction with submodules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470391#M165732</link>
      <description>&lt;P&gt;Bug filed, CMPLRLLVM-46225. I get the same error messages with ifx and ifort.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Mar 2023 21:07:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470391#M165732</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-03-27T21:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Re:ifort gets confused with procedure names in conjunction with submodules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470558#M165734</link>
      <description>&lt;P&gt;Thanks for checking.&lt;/P&gt;
&lt;P&gt;It is actually an old bug, which I also get with an older ifort version. Meanwhile I also saw (with another real code case) that an abstract derived-type in the main module (as in the example) is not necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 05:22:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1470558#M165734</guid>
      <dc:creator>martinmath</dc:creator>
      <dc:date>2023-03-28T05:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: ifort gets confused with procedure names in conjunction with submodules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1680213#M175426</link>
      <description>&lt;P class="sub_section_element_selectors"&gt;This issue was fixed in ifx 2025.1&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&lt;A class="sub_section_element_selectors" href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit-download.html?packages=fortran-essentials&amp;amp;fortran-essentials-os=windows&amp;amp;fortran-essentials-win=offline" target="_blank" rel="nofollow noopener noreferrer"&gt;Get Intel® oneAPI HPC Toolkit&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 16:31:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-gets-confused-with-procedure-names-in-conjunction-with/m-p/1680213#M175426</guid>
      <dc:creator>Devorah_H_Intel</dc:creator>
      <dc:date>2025-04-03T16:31:25Z</dc:date>
    </item>
  </channel>
</rss>

