<?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 The problem is not a compile in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930864#M87781</link>
    <description>&lt;P&gt;The problem is not a compile error, it's wrong results at run-time. Version 12.1.5 is about a year old&lt;/P&gt;</description>
    <pubDate>Sun, 28 Jul 2013 19:28:53 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2013-07-28T19:28:53Z</dc:date>
    <item>
      <title>Assignment with polymorphic component, wrong result</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930858#M87775</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; the attached code should print "1&amp;nbsp; 2", however, it prints "2&amp;nbsp; 2".&lt;BR /&gt;Indeed, it seems that each assignment to V(I) in fact assigns to the&lt;BR /&gt;whole array V.&lt;BR /&gt;&lt;BR /&gt;ifort -V&lt;BR /&gt;Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.1 Build 20130121&lt;BR /&gt;&lt;BR /&gt;(I don't have the very latest version, so I don't know how it works).&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;program ts&lt;BR /&gt;&amp;nbsp;implicit none&lt;BR /&gt;&amp;nbsp;type, abstract :: at&lt;BR /&gt;&amp;nbsp; integer :: f&lt;BR /&gt;&amp;nbsp;end type at&lt;BR /&gt;&amp;nbsp;type, extends(at) :: t&lt;BR /&gt;&amp;nbsp;end type t&lt;BR /&gt;&amp;nbsp;type :: tv&lt;BR /&gt;&amp;nbsp; class(at), allocatable :: x&lt;BR /&gt;&amp;nbsp;end type tv&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;type(tv), allocatable :: v(:)&lt;BR /&gt;&amp;nbsp;type(tv) :: x&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; allocate(v(2))&lt;BR /&gt;&amp;nbsp; allocate(t::x%x)&lt;BR /&gt;&amp;nbsp; x%x%f = 1&lt;BR /&gt;&amp;nbsp; v(1) = x&lt;BR /&gt;&amp;nbsp; x%x%f = 2&lt;BR /&gt;&amp;nbsp; v(2) = x&lt;BR /&gt;&amp;nbsp; ! Should print "1&amp;nbsp; 2"&lt;BR /&gt;&amp;nbsp; write(*,*) v(1)%x%f, v(2)%x%f&lt;BR /&gt;&lt;BR /&gt;end program ts&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 22:35:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930858#M87775</guid>
      <dc:creator>MR</dc:creator>
      <dc:date>2013-04-15T22:35:04Z</dc:date>
    </item>
    <item>
      <title>I can reproduce this with the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930859#M87776</link>
      <description>&lt;P&gt;I can reproduce this with the latest version - thanks. We'll look into it.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 17:28:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930859#M87776</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-04-17T17:28:48Z</dc:date>
    </item>
    <item>
      <title>Escalated as issue</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930860#M87777</link>
      <description>&lt;P&gt;Escalated as issue DPD200243378. It is somewhat interesting that intrinsic assignment to a polymorphic variable is non-standard in F2003 (it is new in F2008) and we don't yet support that, but a polymorphic allocatable component of a derived type is ok in F2003 (and we are supposed to support that feature.)&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 18:24:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930860#M87777</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-04-17T18:24:57Z</dc:date>
    </item>
    <item>
      <title>Steve, thank you for the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930861#M87778</link>
      <description>&lt;P&gt;Steve, thank you for the update.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;It is somewhat interesting that intrinsic assignment to a polymorphic variable is non-standard in F2003 (it is new in F2008) and we don't yet support that, but a polymorphic allocatable component of a derived type is ok in F2003 (and we are supposed to support that feature.)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, indeed. It looks like this parallels what happened with allocatable arrays: initially they were reallocated only inside derived types (F95+TR), but not as standalone variables, and then this "inconsistency" was removed allowing reallocation of the left-hand-side (F2003).&lt;BR /&gt;&lt;BR /&gt;Marco&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 08:32:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930861#M87778</guid>
      <dc:creator>MR</dc:creator>
      <dc:date>2013-04-18T08:32:56Z</dc:date>
    </item>
    <item>
      <title>This has been fixed for a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930862#M87779</link>
      <description>&lt;P&gt;This has been fixed for a future update, probably October.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2013 15:41:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930862#M87779</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-07-26T15:41:29Z</dc:date>
    </item>
    <item>
      <title>Interestingly, using the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930863#M87780</link>
      <description>&lt;P&gt;Interestingly, using the (hopefully not so old-fashioned) "Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.1.5.339 Build 20120612", the provided example compiles fine, nevertheless the result seems to be "0 0"...&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2013 09:40:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930863#M87780</guid>
      <dc:creator>m_sulc</dc:creator>
      <dc:date>2013-07-28T09:40:25Z</dc:date>
    </item>
    <item>
      <title>The problem is not a compile</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930864#M87781</link>
      <description>&lt;P&gt;The problem is not a compile error, it's wrong results at run-time. Version 12.1.5 is about a year old&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2013 19:28:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930864#M87781</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-07-28T19:28:53Z</dc:date>
    </item>
    <item>
      <title>Yes, of course, I just wanted</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930865#M87782</link>
      <description>&lt;P&gt;Yes, of course, I just wanted to point out that the older version produces a different result (still incorrect, though). There, the problem seems to mainly consist in the fact that after the assignment:&lt;BR /&gt;[fortran]&lt;BR /&gt;v(1) = x&lt;BR /&gt;[/fortran]&lt;BR /&gt;v(1)%x is not allocated, although it (in F2003) should, right?&lt;BR /&gt;Using ifort 13, ALLOCATED(v(1)%x) returns .TRUE.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2013 16:41:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930865#M87782</guid>
      <dc:creator>m_sulc</dc:creator>
      <dc:date>2013-07-29T16:41:31Z</dc:date>
    </item>
    <item>
      <title>The present problem is that</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930866#M87783</link>
      <description>&lt;P&gt;The present problem is that the compiler incorrectly handles the assignments to v(1) and v(2), effectively assigning to all elements of v for each assignment. The write of v(2) overwrote the value of v(1), leading to the wrong result.&lt;/P&gt;
&lt;P&gt;I would not be astonished that 12.1 got it even more wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2013 18:01:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-with-polymorphic-component-wrong-result/m-p/930866#M87783</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-07-29T18:01:50Z</dc:date>
    </item>
  </channel>
</rss>

