<?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 Development received an in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973379#M97694</link>
    <description>&lt;P&gt;Development received an earlier report of this and already had a fix targeted to the major release later this year but with this report they are now also targeting the fix to an upcoming update for the current Composer XE 2013 SP1 (14.0 compiler) release. Hopefully this will be in the Update 3 tentative scheduled for later this month.&lt;BR /&gt;&lt;BR /&gt;I will update the post as I learn more.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Apr 2014 18:08:20 GMT</pubDate>
    <dc:creator>Kevin_D_Intel</dc:creator>
    <dc:date>2014-04-07T18:08:20Z</dc:date>
    <item>
      <title>PURE + ASSOCIATE + DO + ALLOCATE/DEALLOCATE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973375#M97690</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;There seems to be a compiler bug caused by the ASSOCIATE statement when used in a PURE procedure, as shown in the following code.&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;module mod1

    implicit none

    type :: mytype
        real, allocatable :: G(:,:,:)
        real, allocatable :: K(:,:,:)
        real, allocatable :: B(:,:,:)
    contains
        procedure :: myproc
    end type

contains
    !----------------------------------------------------------------------------------------------
    pure subroutine myproc(this, n)
        class(mytype), intent(INOUT) :: this
        integer, intent(IN) :: n

        real, allocatable :: XDATA(:), FDATA1(:), FDATA2(:)
        integer :: i, nz

    continue
        associate (G =&amp;gt; this%G, K =&amp;gt; this%K, B =&amp;gt; this%B)

        do i = 1, n
            allocate (XDATA(nz), FDATA1(nz), FDATA2(nz))

            deallocate (XDATA, FDATA1, FDATA2)
        enddo

        end associate

    end subroutine

end module mod1&lt;/PRE&gt;

&lt;P&gt;The errors shown are:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;~$ ll `which ifort`
-rwxr-xr-x 1 root root 3955056 Jan 24 07:03 /opt/intel/composer_xe_2013_sp1.2.144/bin/intel64/ifort*
~$ ifort -c test_pure.f90 
test_pure.f90(26): error #7146: This object must not be used as an allocate-object in an allocate-stmt or deallocate-stmt in a PURE procedure or an internal procedure contained in a PURE procedure.   [XDATA]
            allocate (XDATA(nz), FDATA1(nz), FDATA2(nz))
----------------------^
test_pure.f90(26): error #7146: This object must not be used as an allocate-object in an allocate-stmt or deallocate-stmt in a PURE procedure or an internal procedure contained in a PURE procedure.   [FDATA1]
            allocate (XDATA(nz), FDATA1(nz), FDATA2(nz))
---------------------------------^
test_pure.f90(26): error #7146: This object must not be used as an allocate-object in an allocate-stmt or deallocate-stmt in a PURE procedure or an internal procedure contained in a PURE procedure.   [FDATA2]
            allocate (XDATA(nz), FDATA1(nz), FDATA2(nz))
---------------------------------------------^
test_pure.f90(28): error #7146: This object must not be used as an allocate-object in an allocate-stmt or deallocate-stmt in a PURE procedure or an internal procedure contained in a PURE procedure.   [XDATA]
            deallocate (XDATA, FDATA1, FDATA2)
------------------------^
test_pure.f90(28): error #7146: This object must not be used as an allocate-object in an allocate-stmt or deallocate-stmt in a PURE procedure or an internal procedure contained in a PURE procedure.   [FDATA1]
            deallocate (XDATA, FDATA1, FDATA2)
-------------------------------^
test_pure.f90(28): error #7146: This object must not be used as an allocate-object in an allocate-stmt or deallocate-stmt in a PURE procedure or an internal procedure contained in a PURE procedure.   [FDATA2]
            deallocate (XDATA, FDATA1, FDATA2)
---------------------------------------^
compilation aborted for test_pure.f90 (code 1)&lt;/PRE&gt;

&lt;P&gt;Removing the PURE attribute, commenting the ASSOCIATE/END ASSOCIATE lines, or even moving the ALLOCATE/DEALLOCATE lines outside the loop, all make the error go away.&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2014 03:58:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973375#M97690</guid>
      <dc:creator>John4</dc:creator>
      <dc:date>2014-04-07T03:58:50Z</dc:date>
    </item>
    <item>
      <title>Yep, it does look like a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973376#M97691</link>
      <description>&lt;P&gt;Yep, it does look like a compiler bug.&amp;nbsp; FWIW, the above code compiles ok in gfortran 4.9; the only message is [plain] &lt;I&gt;&lt;FONT color="#0000ff" size="1"&gt;&lt;FONT color="#0000ff" size="1"&gt;warning: 'nz' may be used uninitialized in this function [/plain]&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2014 04:17:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973376#M97691</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2014-04-07T04:17:29Z</dc:date>
    </item>
    <item>
      <title>In the actual code, the value</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973377#M97692</link>
      <description>&lt;P&gt;In the actual code, the value of nz is defined properly ---you may have noticed that the code posted does not do anything useful.&lt;/P&gt;

&lt;P&gt;(OT: When using gfortran, along with deferred-length character variables, I tend to disable -Wmaybe-uninitialized, because it gives way too many useless warnings).&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;John&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2014 04:47:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973377#M97692</guid>
      <dc:creator>John4</dc:creator>
      <dc:date>2014-04-07T04:47:25Z</dc:date>
    </item>
    <item>
      <title>I reported this to</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973378#M97693</link>
      <description>&lt;P&gt;I reported this to Development (internal tracking id below) and will keep you updated on the status as I learn it. Thank you.&lt;BR /&gt;
	&lt;BR /&gt;
	(Internal tracking id: DPD200255246)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;(Resolution Update on 10/08/2014):&lt;/STRONG&gt; This defect is fixed in the Intel® Fortran Composer XE 2013 SP1 Update 3 release (Version 14.0.3.174 Build 20140422 - Linux) -AND- the Intel® Parallel Studio XE 2015 Initial Release (2015.0.090 - Linux)&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2014 11:11:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973378#M97693</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-04-07T11:11:00Z</dc:date>
    </item>
    <item>
      <title>Development received an</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973379#M97694</link>
      <description>&lt;P&gt;Development received an earlier report of this and already had a fix targeted to the major release later this year but with this report they are now also targeting the fix to an upcoming update for the current Composer XE 2013 SP1 (14.0 compiler) release. Hopefully this will be in the Update 3 tentative scheduled for later this month.&lt;BR /&gt;&lt;BR /&gt;I will update the post as I learn more.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2014 18:08:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973379#M97694</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-04-07T18:08:20Z</dc:date>
    </item>
    <item>
      <title>Pardon the late follow-up. I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973380#M97695</link>
      <description>&lt;P&gt;Pardon the late follow-up. I confirmed this defect is fixed in both the &lt;STRONG&gt;Intel® Fortran Composer XE 2013 SP1 Update 3&lt;/STRONG&gt; release (Version 14.0.3.174 Build 20140422 - Linux) &lt;EM&gt;-AND-&lt;/EM&gt; the &lt;STRONG&gt;Intel® Parallel Studio XE 2015 Initial Release&lt;/STRONG&gt; (2015.0.090 - Linux)&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2014 11:09:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/PURE-ASSOCIATE-DO-ALLOCATE-DEALLOCATE/m-p/973380#M97695</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-10-08T11:09:10Z</dc:date>
    </item>
  </channel>
</rss>

