<?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 Assignment to an allocatable array in F2003 in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/781000#M27722</link>
    <description>Thanks Steve, sorry about the do loop syntax booboo.&lt;BR /&gt;&lt;BR /&gt;Yes I did mean you to use /assume:realloc_lhs since we are testing F2003 conformance.&lt;BR /&gt;&lt;BR /&gt;The problem showed up in a big project with array index checking on when I attempted to migrate to /assume:realloc_lhs for the whole project.&lt;BR /&gt;</description>
    <pubDate>Tue, 13 Jul 2010 07:25:47 GMT</pubDate>
    <dc:creator>Andrew_Smith</dc:creator>
    <dc:date>2010-07-13T07:25:47Z</dc:date>
    <item>
      <title>Assignment to an allocatable array in F2003</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780994#M27716</link>
      <description>In this example what array bounds would you expect for b ?&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[bash]real a(4)
real, allocatable :: b(:)
integer i

do i = 1 to 4
   a(i) = float(i)
end do

b = a(3:4)
[/bash]&lt;/PRE&gt; IVF gives bounds 3 to 4. It strikes me as wrong but I dont have a copy of the full standard.</description>
      <pubDate>Mon, 12 Jul 2010 15:52:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780994#M27716</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2010-07-12T15:52:02Z</dc:date>
    </item>
    <item>
      <title>Assignment to an allocatable array in F2003</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780995#M27717</link>
      <description>Well, the code you posted would not compile as it has syntax errors. It is not clear to me how you are determining that "IVF gives bounds 3 to 4". I will comment that, unless you compile with /assume:realloc_lhs, b will not get allocated according to the F2003 specs.</description>
      <pubDate>Mon, 12 Jul 2010 16:17:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780995#M27717</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-07-12T16:17:37Z</dc:date>
    </item>
    <item>
      <title>Assignment to an allocatable array in F2003</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780996#M27718</link>
      <description>Steve, I thought the same at first glance. The snippet above when compiled with /assume:realloc_lih gives 3 and 4. Without the /assume, I get 1 and 0 with IVF11.1065.&lt;BR /&gt;&lt;BR /&gt;The 2003 handbook Adams et. al , Chapter 7, page 236 (and Metcalf et al 95/2003 explained, chapter 12, page 243) has the following for assignment of variable = expression ---&lt;BR /&gt;&lt;BR /&gt;4. If the component is allocatable&lt;BR /&gt;a. if it is allocated, it is deallocated.&lt;BR /&gt;b. if the corresponding component of the expression is allocated, the variable&lt;BR /&gt;component is allocated with the same dynamic type and type parameters and,&lt;BR /&gt;&lt;B&gt;if it is an array, with the same bounds&lt;/B&gt;. The value of the expression component&lt;BR /&gt;is then assigned to the variable component using defined assignment if there is&lt;BR /&gt;a consistent type-bound assignment available; otherwise, intrinsic assignment&lt;BR /&gt;is used.&lt;BR /&gt;&lt;BR /&gt;Although it is mentioned in the context of the component of the derived type, it should be the same for intrinsic types as well.&lt;BR /&gt;&lt;BR /&gt;I think then IVF is &lt;I&gt;incorrectly&lt;/I&gt; (in the original post, I had typed "correctly"; hence edited with italics) giving the bounds when compiled with appropriate flag.&lt;BR /&gt;&lt;BR /&gt;Abhi&lt;BR /&gt;&lt;BR /&gt;p.s. For what it is worth, XLFortran version 11 is giving bounds 1 and 2. :(</description>
      <pubDate>Mon, 12 Jul 2010 16:34:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780996#M27718</guid>
      <dc:creator>abhimodak</dc:creator>
      <dc:date>2010-07-12T16:34:00Z</dc:date>
    </item>
    <item>
      <title>Assignment to an allocatable array in F2003</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780997#M27719</link>
      <description>The code you posted does not compile - the syntax for the DO loop is incorrect. It's also incomplete. I corrected this and added code to view the bounds and can see that array B has bounds 3:4.&lt;BR /&gt;&lt;BR /&gt;xlf is correct here - the bounds of the expression a(3:4) are 1:2. You can see this with the following test:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[fortran]real a(4)&lt;BR /&gt;real, allocatable :: b(:)&lt;BR /&gt;integer i&lt;BR /&gt;&lt;BR /&gt; do i = 1 , 4&lt;BR /&gt;   a(i) = float(i)&lt;BR /&gt;end do&lt;BR /&gt;&lt;BR /&gt;b = a(3:4)&lt;BR /&gt;&lt;BR /&gt;print *, b&lt;BR /&gt;print *, lbound(b), ubound(b)&lt;BR /&gt;print *, lbound(a(3:4)), ubound(a(3:4))&lt;BR /&gt;end[/fortran]&lt;/PRE&gt; &lt;BR /&gt;I will report this to the developers.</description>
      <pubDate>Mon, 12 Jul 2010 16:44:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780997#M27719</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-07-12T16:44:50Z</dc:date>
    </item>
    <item>
      <title>Assignment to an allocatable array in F2003</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780998#M27720</link>
      <description>Hi Steve&lt;BR /&gt;&lt;BR /&gt;A loosely related topic of pointer remapping: (http://software.intel.com/en-us/forums/showthread.php?t=67515&amp;amp;o=a&amp;amp;s=lr).&lt;BR /&gt;&lt;BR /&gt;Is this going to make it in August or later?&lt;BR /&gt;&lt;BR /&gt;Abhi</description>
      <pubDate>Mon, 12 Jul 2010 16:47:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780998#M27720</guid>
      <dc:creator>abhimodak</dc:creator>
      <dc:date>2010-07-12T16:47:14Z</dc:date>
    </item>
    <item>
      <title>Assignment to an allocatable array in F2003</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780999#M27721</link>
      <description>Issue ID is DPD200157905. Pointer remapping is expected to be in the end-of-year release. &lt;BR /&gt;</description>
      <pubDate>Mon, 12 Jul 2010 18:19:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/780999#M27721</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-07-12T18:19:58Z</dc:date>
    </item>
    <item>
      <title>Assignment to an allocatable array in F2003</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/781000#M27722</link>
      <description>Thanks Steve, sorry about the do loop syntax booboo.&lt;BR /&gt;&lt;BR /&gt;Yes I did mean you to use /assume:realloc_lhs since we are testing F2003 conformance.&lt;BR /&gt;&lt;BR /&gt;The problem showed up in a big project with array index checking on when I attempted to migrate to /assume:realloc_lhs for the whole project.&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Jul 2010 07:25:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/781000#M27722</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2010-07-13T07:25:47Z</dc:date>
    </item>
    <item>
      <title>Assignment to an allocatable array in F2003</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/781001#M27723</link>
      <description>The bug will be fixed in a future update.</description>
      <pubDate>Thu, 21 Oct 2010 20:53:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Assignment-to-an-allocatable-array-in-F2003/m-p/781001#M27723</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-10-21T20:53:37Z</dc:date>
    </item>
  </channel>
</rss>

