<?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 fix for this might not in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066119#M118489</link>
    <description>&lt;P&gt;The fix for this might not make Update 1, but if not, definitely Update 2.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2016 15:08:32 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2016-09-29T15:08:32Z</dc:date>
    <item>
      <title>Issue with ALLOCATE(..., SOURCE=...) and polymorphic array slices</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066117#M118487</link>
      <description>&lt;P&gt;I experience unexpected behavior when allocating a polymorphic array from a part of another polymorphic array.&amp;nbsp;I have added a fully working program demonstrating the problem.&lt;/P&gt;

&lt;P&gt;In both cases, I would have expected to get a TargetItems array with 5 elements. But in the first case, I get an array with 10 elements, i.e. the full size of the SourceItems array.&lt;/P&gt;

&lt;P&gt;I have seen this behavior with the latest IVF 17.0.0.109 as well as several previous versions.&lt;/P&gt;

&lt;P&gt;Another issue: In the debugger (using IVF 17 and VS 2015 Update 3), all arrays are shown as undefined even after the allocate...&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Thomas&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;&amp;nbsp; program AllocateSourceIssueWithArraySlice

&amp;nbsp;&amp;nbsp; implicit none

&amp;nbsp;&amp;nbsp;&amp;nbsp; type :: baseType
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer aValue
&amp;nbsp;&amp;nbsp;&amp;nbsp; end type
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class (baseType), ALLOCATABLE :: SourceItems(:)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class (baseType), ALLOCATABLE :: TargetItems(:)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ALLOCATE( baseType::SourceItems(10))
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print *, 'Allocating with arrayslice in SOURCE= statement'
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ALLOCATE( TargetItems, SOURCE=SourceItems(1:5) )
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print *, 'Size SourceItems (expected 10): ', SIZE(SourceItems)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print *, 'Size TargetItems (expected 5):&amp;nbsp; ', SIZE(TargetItems)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEALLOCATE(TargetItems)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print *, 'Allocating with arrayslice via assosciate construct'
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ASSOCIATE (Source =&amp;gt; SourceItems(1:5))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ALLOCATE( TargetItems, SOURCE=Source )
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END ASSOCIATE
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print *, 'Size SourceItems (expected 10): ', SIZE(SourceItems)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print *, 'Size TargetItems (expected 5):&amp;nbsp; ', SIZE(TargetItems)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end program

&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Sep 2016 17:51:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066117#M118487</guid>
      <dc:creator>thomas_boehme</dc:creator>
      <dc:date>2016-09-06T17:51:02Z</dc:date>
    </item>
    <item>
      <title>Thanks - escalated as issue</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066118#M118488</link>
      <description>&lt;P&gt;Thanks - escalated as issue&amp;nbsp;DPD200414141. Interesting that if the source array is not polymorphic, it works correctly.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 18:57:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066118#M118488</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-09-06T18:57:20Z</dc:date>
    </item>
    <item>
      <title>The fix for this might not</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066119#M118489</link>
      <description>&lt;P&gt;The fix for this might not make Update 1, but if not, definitely Update 2.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 15:08:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066119#M118489</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-09-29T15:08:32Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066120#M118490</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The fix for this might not make Update 1, but if not, definitely Update 2.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks for the update on this issue.&lt;/P&gt;

&lt;P&gt;Steve, in my original post I also mentioned that I am unable to see the variables in the above program in the debugger (VS2015 Update 3/IVF 17). Is that something specific to my installation or do have this issue as well?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 06:55:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066120#M118490</guid>
      <dc:creator>thomas_boehme</dc:creator>
      <dc:date>2016-09-30T06:55:54Z</dc:date>
    </item>
    <item>
      <title>The debugger issue is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066121#M118491</link>
      <description>&lt;P&gt;The debugger issue is unrelated - the debugger still has problems with polymorphic variables. I will check with our debugger folk to make sure they're aware of this (DPD200414790).&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 15:46:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-ALLOCATE-SOURCE-and-polymorphic-array-slices/m-p/1066121#M118491</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-09-30T15:46:00Z</dc:date>
    </item>
  </channel>
</rss>

