<?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 Quote:Kevin Davis (Intel) in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033560#M111166</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kevin Davis (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The erroneous error noted in post #1 is fixed in the latest &lt;STRONG&gt;PSXE 2016 Update 2 release&lt;/STRONG&gt; (PSXE 2016.2.055/ CnL 2016.2.180 - Windows)&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks, Kevn, for the update - I've confirmed the fix.&lt;/P&gt;</description>
    <pubDate>Sat, 27 Feb 2016 14:21:50 GMT</pubDate>
    <dc:creator>FortranFan</dc:creator>
    <dc:date>2016-02-27T14:21:50Z</dc:date>
    <item>
      <title>Unexpected compiler error with the use of a type-bound procedure returning a POINTER type in the intrinsic function ASSOCIATED</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033554#M111160</link>
      <description>&lt;P&gt;The compiler error with the following code appears to be incorrect:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;module m

   implicit none

   private

   type, public :: t
      private
      integer, pointer :: m_i
   contains
      private
      procedure, pass(this), public :: iptr =&amp;gt; getptr
      procedure, pass(this), public :: setptr
   end type t


contains

   subroutine setptr( this, iptr )

      !.. Argument list
      class(t), intent(inout)         :: this
      integer, pointer, intent(inout) :: iptr

      this%m_i =&amp;gt; iptr

      return

   end subroutine setptr

   function getptr( this ) result( iptr )

      !.. Argument list
      class(t), intent(in) :: this
      !.. Function result
      integer, pointer :: iptr

      iptr =&amp;gt; this%m_i

      return

   end function getptr

end module m
&lt;/PRE&gt;

&lt;PRE class="brush:fortran;"&gt;program p

   use m, only : t

   integer, pointer :: i
   type(t) :: foo

   print *, " Is i associated with foo%iptr? ", associated( i, foo%iptr() )

   stop

end program p
&lt;/PRE&gt;

&lt;PRE class="brush:plain;"&gt;Compiling with Intel(R) Visual Fortran Compiler XE 15.0.4.221 [Intel(R) 64]...
p.f90
C:\..\p.f90(8): error #6808: The TARGET argument must have the POINTER or TARGET attribute.
[ASSOCIATED]
compilation aborted for C:\..\p.f90 (code 1)
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 17:27:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033554#M111160</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2015-07-30T17:27:02Z</dc:date>
    </item>
    <item>
      <title>FWIW, Compiler 16.0, update 2</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033555#M111161</link>
      <description>&lt;P&gt;FWIW, Compiler 15.0, update 2 gives the same error as well.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 17:31:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033555#M111161</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2015-07-30T17:31:00Z</dc:date>
    </item>
    <item>
      <title>And just to show it is a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033556#M111162</link>
      <description>&lt;P&gt;And just to show it is a problem with the type-bound aspect of the type, code compiles and works ok with the following simple change:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;module m

   implicit none

   private

   type, public :: t
      private
      integer, pointer :: m_i
   contains
      private
      procedure, pass(this), public :: iptr =&amp;gt; getptr
      procedure, pass(this), public :: setptr
   end type t

   public :: getptr

contains

   subroutine setptr( this, iptr )

      !.. Argument list
      class(t), intent(inout)         :: this
      integer, pointer, intent(inout) :: iptr

      this%m_i =&amp;gt; iptr

      return

   end subroutine setptr

   function getptr( this ) result( iptr )

      !.. Argument list
      class(t), intent(in) :: this
      !.. Function result
      integer, pointer :: iptr

      iptr =&amp;gt; this%m_i

      return

   end function getptr

end module m
&lt;/PRE&gt;

&lt;PRE class="brush:fortran;"&gt;program p

   use m, only : t, getptr

   integer, pointer :: i
   type(t) :: foo

   !.. create i with some value
   allocate(i, source=42)

   call foo%setptr( i )

   print *, " Is i associated with getptr( foo )? ", associated( i, getptr( foo ) )
   print *, " getptr( foo ) = ", getptr( foo )
   print *, " foo%iptr() = ", foo%iptr()

   stop

end program p
&lt;/PRE&gt;

&lt;P&gt;Upon execution,&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;  Is i associated with getptr( foo)?  T
  getptr( foo ) =  42
  foo%iptr() =  42
Press any key to continue . . .&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 17:39:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033556#M111162</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2015-07-30T17:39:00Z</dc:date>
    </item>
    <item>
      <title>Thank you FortranFan for all</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033557#M111163</link>
      <description>&lt;P&gt;Thank you FortranFan for all the details. I reported this to our Developers and will keep you updated about what I hear back.&lt;/P&gt;

&lt;P&gt;(Internal tracking id: DPD200374298)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;(Resolution Update on 02/27/2016):&lt;/STRONG&gt; This defect is fixed in the Intel® Parallel Studio XE 2016 Update 2 Release (PSXE 2016.2.055/ CnL 2016.2.180 - Windows)&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 17:55:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033557#M111163</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-07-30T17:55:00Z</dc:date>
    </item>
    <item>
      <title>Thanks, Kevin, for your</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033558#M111164</link>
      <description>&lt;P&gt;Thanks, Kevin, for your prompt follow-up.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 20:51:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033558#M111164</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2015-07-30T20:51:50Z</dc:date>
    </item>
    <item>
      <title>The erroneous error noted in</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033559#M111165</link>
      <description>&lt;P&gt;The erroneous error noted in post #1 is fixed in the latest &lt;STRONG&gt;PSXE 2016 Update 2 release&lt;/STRONG&gt; (PSXE 2016.2.055/ CnL 2016.2.180 - Windows)&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 10:27:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033559#M111165</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2016-02-27T10:27:01Z</dc:date>
    </item>
    <item>
      <title>Quote:Kevin Davis (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033560#M111166</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kevin Davis (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The erroneous error noted in post #1 is fixed in the latest &lt;STRONG&gt;PSXE 2016 Update 2 release&lt;/STRONG&gt; (PSXE 2016.2.055/ CnL 2016.2.180 - Windows)&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks, Kevn, for the update - I've confirmed the fix.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 14:21:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Unexpected-compiler-error-with-the-use-of-a-type-bound-procedure/m-p/1033560#M111166</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2016-02-27T14:21:50Z</dc:date>
    </item>
  </channel>
</rss>

