<?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:Andrew Smith wrote: in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Overridden-procedure-ignored-at-runtime/m-p/1158473#M142241</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Andrew Smith wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the same structure in a simple example but it did not fail. I deleted all of the data and extra procedures contained in each type as part of the simplification. Could that have influenced it?&lt;/P&gt;&lt;P&gt;The actual code fails in both relase and fully debugged mode so hopefully its not a case of data trampling over descriptors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's of any help, you can take something like this and adapt it your situation: keep an eye on aspects such as how the caller allocates the objects, compiler settings (any use of /assume options), basically every little detail:&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;module b_m
   type, abstract :: b_t
      integer :: i = 0
   contains
      procedure(Isub), pass(this), deferred :: sub
   end type
   abstract interface
      subroutine Isub( this )
         import :: b_t
         class(b_t), intent(in) :: this
      end subroutine
   end interface
end module
module e_m
   use b_m, only : b_t
   type, extends(b_t), abstract :: e_t
   end type
end module
module c_m
   use e_m, only : e_t
   type, extends(e_t) :: c_t
   contains
      procedure, pass(this) :: sub =&amp;gt; csub
   end type
contains
   subroutine csub( this )
      class(c_t), intent(in) :: this
      print *, "In csub: this%i = ", this%i
   end subroutine
end module
module d_m
   use c_m, only : c_t
   type, extends(c_t) :: d_t
   contains
      procedure, pass(this) :: sub =&amp;gt; dsub
   end type
contains
   subroutine dsub( this )
      class(d_t), intent(in) :: this
      print *, "In dsub: this%i = ", this%i
   end subroutine
end module
program p
   use b_m, only : b_t
   use c_m, only : c_t
   use d_m, only : d_t
   class(b_t), allocatable :: foo
   class(b_t), allocatable :: bar
   allocate( c_t :: foo ) ; foo%i = 1
   call foo%sub()
   allocate( d_t :: bar ) ; bar%i = 2
   call bar%sub()
   stop
end program
&lt;/PRE&gt;

&lt;P&gt;As you indicated, a simple example like this won't reproduce the problem at first, the program output will be as expected - see below.&amp;nbsp; Thus&amp;nbsp;refining the details further to mimic the exact pattern in your actual code is key.&lt;/P&gt;

&lt;PRE class="brush:plain; class-name:dark;"&gt; In csub: this%i =  1
 In dsub: this%i =  2
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Dec 2019 16:27:00 GMT</pubDate>
    <dc:creator>FortranFan</dc:creator>
    <dc:date>2019-12-17T16:27:00Z</dc:date>
    <item>
      <title>Overridden procedure ignored at runtime</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Overridden-procedure-ignored-at-runtime/m-p/1158470#M142238</link>
      <description>&lt;P&gt;I have a class structure 4 deep, with an abstract type at the top two levels.&lt;/P&gt;&lt;P&gt;I have a deffered contained procedure in the abtract type that has a concrete implementation at levels 3 and 4.&lt;/P&gt;&lt;P&gt;I create instances of both level 3 and 4 types. If I call the procedure on both types [ using object%procecdure(), where object is class(BaseLevel) object ], only the procedure defined on level 3 is called. It means overriding has not taken on objects of type 4.&lt;/P&gt;&lt;P&gt;I have thousands of similar overridden procedures that work. Only this combination of structure fails.&lt;/P&gt;&lt;P&gt;I first encountered this compiler error in XE 2016 and it is still present in the XE 2019 update 5.&lt;/P&gt;&lt;P&gt;It is not possible to work around it without going back to pre-object oriented code.&lt;/P&gt;&lt;P&gt;I am not sure if I can reproduce it in a small piece of code, but I am going to try as I know Steves first question will be that.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 11:58:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Overridden-procedure-ignored-at-runtime/m-p/1158470#M142238</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2019-12-17T11:58:57Z</dc:date>
    </item>
    <item>
      <title>I created the same structure</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Overridden-procedure-ignored-at-runtime/m-p/1158471#M142239</link>
      <description>&lt;P&gt;I created the same structure in a simple example but it did not fail. I deleted all of the data and extra procedures contained in each type as part of the simplification. Could that have influenced it?&lt;/P&gt;&lt;P&gt;The actual code fails in both relase and fully debugged mode so hopefully its not a case of data trampling over descriptors.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 14:44:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Overridden-procedure-ignored-at-runtime/m-p/1158471#M142239</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2019-12-17T14:44:21Z</dc:date>
    </item>
    <item>
      <title>Quote:Andrew Smith wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Overridden-procedure-ignored-at-runtime/m-p/1158472#M142240</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Andrew Smith wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..&amp;nbsp;I am not sure if I can reproduce it in a small piece of code, but I am going to try as I know Steves first question will be that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Andrew Smith,&lt;/P&gt;&lt;P&gt;Re: "I am not sure if I can reproduce it in a small piece of code, but I am going to try as I know Steves first question will be that," yes that's likely your best bet for a successful resolution to your issue.&lt;/P&gt;&lt;P&gt;And keep in mind the American proverb: "if you don't succeed at&amp;nbsp;first, try, try again"!&lt;/P&gt;&lt;P&gt;You can find an instance of it in this thread, see&amp;nbsp;Quote #5:&amp;nbsp;https://software.intel.com/en-us/node/685154#comment-form.&amp;nbsp; A simple reproducer that ultimately 'modeled' closely the pattern of the actual code reproduced the issue which then helped&amp;nbsp;the Intel compiler team develop a fix.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 16:19:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Overridden-procedure-ignored-at-runtime/m-p/1158472#M142240</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2019-12-17T16:19:20Z</dc:date>
    </item>
    <item>
      <title>Quote:Andrew Smith wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Overridden-procedure-ignored-at-runtime/m-p/1158473#M142241</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Andrew Smith wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the same structure in a simple example but it did not fail. I deleted all of the data and extra procedures contained in each type as part of the simplification. Could that have influenced it?&lt;/P&gt;&lt;P&gt;The actual code fails in both relase and fully debugged mode so hopefully its not a case of data trampling over descriptors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's of any help, you can take something like this and adapt it your situation: keep an eye on aspects such as how the caller allocates the objects, compiler settings (any use of /assume options), basically every little detail:&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;module b_m
   type, abstract :: b_t
      integer :: i = 0
   contains
      procedure(Isub), pass(this), deferred :: sub
   end type
   abstract interface
      subroutine Isub( this )
         import :: b_t
         class(b_t), intent(in) :: this
      end subroutine
   end interface
end module
module e_m
   use b_m, only : b_t
   type, extends(b_t), abstract :: e_t
   end type
end module
module c_m
   use e_m, only : e_t
   type, extends(e_t) :: c_t
   contains
      procedure, pass(this) :: sub =&amp;gt; csub
   end type
contains
   subroutine csub( this )
      class(c_t), intent(in) :: this
      print *, "In csub: this%i = ", this%i
   end subroutine
end module
module d_m
   use c_m, only : c_t
   type, extends(c_t) :: d_t
   contains
      procedure, pass(this) :: sub =&amp;gt; dsub
   end type
contains
   subroutine dsub( this )
      class(d_t), intent(in) :: this
      print *, "In dsub: this%i = ", this%i
   end subroutine
end module
program p
   use b_m, only : b_t
   use c_m, only : c_t
   use d_m, only : d_t
   class(b_t), allocatable :: foo
   class(b_t), allocatable :: bar
   allocate( c_t :: foo ) ; foo%i = 1
   call foo%sub()
   allocate( d_t :: bar ) ; bar%i = 2
   call bar%sub()
   stop
end program
&lt;/PRE&gt;

&lt;P&gt;As you indicated, a simple example like this won't reproduce the problem at first, the program output will be as expected - see below.&amp;nbsp; Thus&amp;nbsp;refining the details further to mimic the exact pattern in your actual code is key.&lt;/P&gt;

&lt;PRE class="brush:plain; class-name:dark;"&gt; In csub: this%i =  1
 In dsub: this%i =  2
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 16:27:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Overridden-procedure-ignored-at-runtime/m-p/1158473#M142241</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2019-12-17T16:27:00Z</dc:date>
    </item>
  </channel>
</rss>

