<?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 Unimplemented F2008 feature or compiler bug in ifx 2024.0? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1546870#M169372</link>
    <description>&lt;P&gt;Starting with the Fortran 2008 standard, a dummy argument with the allocatable attribute is distinguishable from one with the pointer attribute (see F2018 15.4.3.4.5) when defining a generic interface.&amp;nbsp; Hence the following example should be conforming:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;module secure_hash_factory

  implicit none
  private

  public :: secure_hash, new_secure_hash

  type, abstract :: secure_hash
  end type

  interface new_secure_hash
    procedure new_secure_hash_alloc, new_secure_hash_ptr
  end interface

contains

  subroutine new_secure_hash_alloc(hash)
    class(secure_hash), allocatable, intent(out) :: hash
    print *, 'allocatable'
  end subroutine

  subroutine new_secure_hash_ptr(hash)
    class(secure_hash), pointer, intent(out) :: hash
    print *, 'pointer'
  end subroutine

end module

use secure_hash_factory
class(secure_hash), allocatable :: h1
class(secure_hash), pointer :: h2
call new_secure_hash(h1)
call new_secure_hash(h2)
end&lt;/LI-CODE&gt;&lt;P&gt;Indeed, if the module is compiled by itself, ifx 2024.0 reports no error. However when the module is used by another program unit and the generic function referenced (as in the main program of the example), the compiler issues the following strange error:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ ifx -c intel-20231123.f90
intel-20231123.f90: error #5286: Ambiguous generic interface NEW_SECURE_HASH: previously declared specific procedure SECURE_HASH_FACTORY::NEW_SECURE_HASH_ALLOC is not distinguishable from this declaration. [SECURE_HASH_FACTORY::NEW_SECURE_HASH_PTR]
intel-20231123.f90(32): error #7496: A non-pointer actual argument shall have a TARGET attribute when associated with a pointer dummy argument.   [H1]
call new_secure_hash(h1)
---------------------^
compilation aborted for intel-20231123.f90 (code 1)&lt;/LI-CODE&gt;&lt;P&gt;Is this a case of a not-yet-completed F2008 feature or a compiler bug?&amp;nbsp; I suspect the latter.&amp;nbsp; Note that NAG and GFortran both compile (and run) the example without error.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Nov 2023 14:57:52 GMT</pubDate>
    <dc:creator>NCarlson</dc:creator>
    <dc:date>2023-11-23T14:57:52Z</dc:date>
    <item>
      <title>Unimplemented F2008 feature or compiler bug in ifx 2024.0?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1546870#M169372</link>
      <description>&lt;P&gt;Starting with the Fortran 2008 standard, a dummy argument with the allocatable attribute is distinguishable from one with the pointer attribute (see F2018 15.4.3.4.5) when defining a generic interface.&amp;nbsp; Hence the following example should be conforming:&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;module secure_hash_factory

  implicit none
  private

  public :: secure_hash, new_secure_hash

  type, abstract :: secure_hash
  end type

  interface new_secure_hash
    procedure new_secure_hash_alloc, new_secure_hash_ptr
  end interface

contains

  subroutine new_secure_hash_alloc(hash)
    class(secure_hash), allocatable, intent(out) :: hash
    print *, 'allocatable'
  end subroutine

  subroutine new_secure_hash_ptr(hash)
    class(secure_hash), pointer, intent(out) :: hash
    print *, 'pointer'
  end subroutine

end module

use secure_hash_factory
class(secure_hash), allocatable :: h1
class(secure_hash), pointer :: h2
call new_secure_hash(h1)
call new_secure_hash(h2)
end&lt;/LI-CODE&gt;&lt;P&gt;Indeed, if the module is compiled by itself, ifx 2024.0 reports no error. However when the module is used by another program unit and the generic function referenced (as in the main program of the example), the compiler issues the following strange error:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;$ ifx -c intel-20231123.f90
intel-20231123.f90: error #5286: Ambiguous generic interface NEW_SECURE_HASH: previously declared specific procedure SECURE_HASH_FACTORY::NEW_SECURE_HASH_ALLOC is not distinguishable from this declaration. [SECURE_HASH_FACTORY::NEW_SECURE_HASH_PTR]
intel-20231123.f90(32): error #7496: A non-pointer actual argument shall have a TARGET attribute when associated with a pointer dummy argument.   [H1]
call new_secure_hash(h1)
---------------------^
compilation aborted for intel-20231123.f90 (code 1)&lt;/LI-CODE&gt;&lt;P&gt;Is this a case of a not-yet-completed F2008 feature or a compiler bug?&amp;nbsp; I suspect the latter.&amp;nbsp; Note that NAG and GFortran both compile (and run) the example without error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 14:57:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1546870#M169372</guid>
      <dc:creator>NCarlson</dc:creator>
      <dc:date>2023-11-23T14:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unimplemented F2008 feature or compiler bug in ifx 2024.0?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1547321#M169404</link>
      <description>&lt;P&gt;It does look like an oversight.&lt;/P&gt;&lt;P&gt;Intel compiler team will perhaps add this simple variant to the test case also?&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;   generic :: s =&amp;gt; sa, sp
   integer, allocatable :: x
   integer, pointer :: y
   call s( x )
   call s( y )
contains
   subroutine sa( a )
      integer, allocatable, intent(out) :: a
      a = 42
   end subroutine 
   subroutine sp( a )
      integer, pointer, intent(out) :: a
      a =&amp;gt; null()
   end subroutine
end&lt;/LI-CODE&gt;&lt;LI-CODE lang="none"&gt;C:\temp&amp;gt;ifort /c /standard-semantics /free p.f
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.10.0 Build 20230609_000000
Copyright (C) 1985-2023 Intel Corporation.  All rights reserved.

p.f(1): error #5286: Ambiguous generic interface S: previously declared specific procedure SA is not distinguishable from this declaration. [SP]
   generic :: s =&amp;gt; sa, sp
-----------------------^
p.f(4): error #7496: A non-pointer actual argument shall have a TARGET attribute when associated with a pointer dummy argument.   [X]
   call s( x )
-----------^
compilation aborted for p.f (code 1)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 25 Nov 2023 00:07:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1547321#M169404</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2023-11-25T00:07:40Z</dc:date>
    </item>
    <item>
      <title>Re:Unimplemented F2008 feature or compiler bug in ifx 2024.0?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1547909#M169464</link>
      <description>&lt;P&gt;Thank you, gentlemen! &lt;/P&gt;&lt;P&gt;I filed a bug report, CMPLRLLVM-53947, for this issue.&lt;/P&gt;&lt;P&gt;I do have a question. Is this an F2008 feature or F2018? I'm curious because, &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/219596"&gt;@NCarlson&lt;/a&gt;, you wrote F2008, but cited F2018. I don't spend a lot of time reading the standard. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Nov 2023 18:08:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1547909#M169464</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-11-27T18:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Unimplemented F2008 feature or compiler bug in ifx 2024.0?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1547913#M169465</link>
      <description>&lt;P&gt;It is F2008; see&amp;nbsp;12.4.3.4.5 in that standard.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 18:23:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1547913#M169465</guid>
      <dc:creator>NCarlson</dc:creator>
      <dc:date>2023-11-27T18:23:19Z</dc:date>
    </item>
    <item>
      <title>Re:Unimplemented F2008 feature or compiler bug in ifx 2024.0?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1547944#M169467</link>
      <description>&lt;P&gt;Thank you, &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/219596"&gt;@NCarlson&lt;/a&gt;!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Nov 2023 19:32:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1547944#M169467</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-11-27T19:32:13Z</dc:date>
    </item>
    <item>
      <title>Re:Unimplemented F2008 feature or compiler bug in ifx 2024.0?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1585579#M171519</link>
      <description>&lt;P&gt;The erroneous error messages you reported are fixed in ifx 2024.2.0 that is planned for release in  mid-2024. Watch for that release!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Apr 2024 16:13:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unimplemented-F2008-feature-or-compiler-bug-in-ifx-2024-0/m-p/1585579#M171519</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2024-04-02T16:13:12Z</dc:date>
    </item>
  </channel>
</rss>

