<?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 Thank you for reporting this in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030103#M110342</link>
    <description>&lt;P&gt;Thank you for reporting this internal error. I will look into this and reply again soon.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jul 2015 16:55:46 GMT</pubDate>
    <dc:creator>Kevin_D_Intel</dc:creator>
    <dc:date>2015-07-28T16:55:46Z</dc:date>
    <item>
      <title>ICE with valid code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030102#M110341</link>
      <description>&lt;P&gt;Hi, I see and ICE with the attached code, both versions (A) and (B).&lt;/P&gt;

&lt;P&gt;$ ifort -c ice.f90&lt;BR /&gt;
	ice.f90(33): warning #6178: The return value of this FUNCTION has not been defined.&amp;nbsp;&amp;nbsp; &lt;Y&gt;&lt;BR /&gt;
	&amp;nbsp;pure recursive function unpck(x) result(y)&lt;BR /&gt;
	-----------------------------------------^&lt;BR /&gt;
	ice.f90(45): catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report.&amp;nbsp; Note: File and line given may not be explicit cause of this error.&lt;BR /&gt;
	compilation aborted for ice.f90 (code 1)&lt;/Y&gt;&lt;/P&gt;

&lt;P&gt;$ ifort -V&lt;BR /&gt;
	Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0 Build 20150407&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;module m

 implicit none

 public :: t_base, unpck

 private

 type, abstract :: t_base
 contains
  private
  generic, public :: operator(+) =&amp;gt; add
  procedure(i_add), pass(x), deferred :: add
 end type t_base

 type, extends(t_base) :: t_cont
  class(t_base), allocatable :: f
 contains
  procedure, pass(x) :: add =&amp;gt; cont_add
 end type t_cont
 
 abstract interface
  elemental function i_add(x,y) result(z)
   import :: t_base, t_cont
   implicit none
   class(t_base), intent(in) :: x, y
   type(t_cont) :: z
  end function i_add
 end interface

contains

 pure recursive function unpck(x) result(y)
  class(t_base), intent(in) :: x
  class(t_base), allocatable :: y

 end function unpck

 elemental function cont_add(x,y) result(z)
  class(t_cont), intent(in) :: x
  class(t_base),  intent(in) :: y
  type(t_cont) :: z

   ! Both these lines produce an ICE
   z = unpck(x) + unpck(y) ! (A)
   !allocate( z%f , source=unpck(x)+unpck(y) ) ! (B)
 
 end function cont_add
 
end module m

&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2015 15:14:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030102#M110341</guid>
      <dc:creator>MR</dc:creator>
      <dc:date>2015-07-28T15:14:16Z</dc:date>
    </item>
    <item>
      <title>Thank you for reporting this</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030103#M110342</link>
      <description>&lt;P&gt;Thank you for reporting this internal error. I will look into this and reply again soon.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2015 16:55:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030103#M110342</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-07-28T16:55:46Z</dc:date>
    </item>
    <item>
      <title>While it's true that an ICE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030104#M110343</link>
      <description>&lt;P&gt;While it's true that an ICE implies some problem within the compiler and that compiler developers, especially at Intel, would want all those errors reported and resolved, the part about "valid code" is unclear. &amp;nbsp;It seems to me the offending section in the code as shown boils down pretty much to the following which is invalid per the Fortran standard:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;program p

   implicit none

   type, abstract :: t_base
   end type t_base

   type, extends(t_base) :: t_cont
      class(t_base), allocatable :: f
   end type t_cont

   class(t_base), allocatable :: a
   type(t_cont) :: b

   b = a

   stop

end program p
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2015 17:10:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030104#M110343</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2015-07-28T17:10:00Z</dc:date>
    </item>
    <item>
      <title>Quote:FortranFan wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030105#M110344</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;FortranFan wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;It seems to me the offending section in the code as shown boils down pretty much to the following which is invalid per the Fortran standard:&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Maybe I am overlooking something, otherwise I think the types are correct:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;z = unpck(x) + unpck(y)

! now abusing a little the syntax highlight mechanism...
class(t_base) :: unpck(x), unpck(y)

type(t_cont) :: returned by  add( t_base , t_base )

! which is fine with
type(t_cont) :: z&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2015 18:40:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030105#M110344</guid>
      <dc:creator>MR</dc:creator>
      <dc:date>2015-07-28T18:40:57Z</dc:date>
    </item>
    <item>
      <title>Quote:MR wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030106#M110345</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;MR wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG class="quote-header"&gt;Quote:&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE class="quote-msg quote-nest-1 odd"&gt;
	&lt;DIV class="quote-author"&gt;&lt;EM class="placeholder"&gt;FortranFan&lt;/EM&gt; wrote:&lt;/DIV&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P&gt;It seems to me the offending section in the code as shown boils down pretty much to the following which is invalid per the Fortran standard:&lt;/P&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Maybe I am overlooking something, otherwise I think the types are correct:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;z = unpck(x) + unpck(y)

! now abusing a little the syntax highlight mechanism...
class(t_base) :: unpck(x), unpck(y)

type(t_cont) :: returned by  add( t_base , t_base )

! which is fine with
type(t_cont) :: z&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;You are doing the addition within your binding for the add operator itself - the definitions seem to be going in circles.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2015 21:45:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030106#M110345</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2015-07-28T21:45:00Z</dc:date>
    </item>
    <item>
      <title>I reported the internal error</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030107#M110346</link>
      <description>&lt;P&gt;I reported the internal error to Development (see internal tracking id below) and will update the post regarding that as I hear back.&lt;/P&gt;

&lt;P&gt;While investigating the internal error I ran into the error #6197 that also occurs with FortranFan’s boiled down example. I’m waiting for help from Development to better understand the issue. There are other reports related to that error being invalid that may or may not be at play.&lt;/P&gt;

&lt;P&gt;FYI - gfortran 5.1 suffers an internal error for (B) and successfully compiles (A).&lt;/P&gt;

&lt;P&gt;(Internal tracking id: DPD200374211)&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2015 09:25:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030107#M110346</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2015-07-29T09:25:53Z</dc:date>
    </item>
    <item>
      <title>Quote:Kevin Davis (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030108#M110347</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;I reported the internal error to Development (see internal tracking id below) and will update the post regarding that as I hear back.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;OK, thank you.&lt;/P&gt;

&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;While investigating the internal error I ran into the error #6197 that also occurs with FortranFan’s boiled down example.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I think FortranFan’s boiled down example was intended to be an invalid case, and I think that ifort correctly flags it as such:&lt;/P&gt;

&lt;P&gt;ff.f90(15): error #6197: An assignment of different structure types is invalid.&lt;/P&gt;

&lt;P&gt;The code that I posted, which produces the ICE, is valid, as far as I can tell, since the types involved in the assignment are correct.&lt;/P&gt;

&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;FYI - gfortran 5.1 suffers an internal error for (B) and successfully compiles (A).&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Yes, I have reported it as Bug 67044.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2015 09:41:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ICE-with-valid-code/m-p/1030108#M110347</guid>
      <dc:creator>MR</dc:creator>
      <dc:date>2015-07-29T09:41:06Z</dc:date>
    </item>
  </channel>
</rss>

