<?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 Issue with MOVE_ALLOC in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1367383#M160519</link>
    <description>&lt;P&gt;The following code prints out a non-zero value for ERROR (the value is -858993460). I don't understand how MOVE_ALLOC fails here.&lt;/P&gt;
&lt;P&gt;This is with Intel Fortran Compiler Classic 2021.5.0, on Windows 10, x64, non-coarray code.&lt;/P&gt;
&lt;P&gt;It also looks like there is a non-printable character in MESSAGE - but that's probably a different problem.&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;MODULE M
    IMPLICIT NONE
    TYPE :: W
    END TYPE W
    TYPE :: T
        TYPE(W), ALLOCATABLE :: A(:)
        CONTAINS
            PROCEDURE :: P
    END TYPE T
    CONTAINS
    SUBROUTINE P(SELF, A)
        IMPLICIT NONE
        CLASS(T), INTENT(INOUT) :: SELF
        TYPE(W), ALLOCATABLE, INTENT(INOUT) :: A(:)
        CHARACTER(LEN = 132) :: MESSAGE
        INTEGER :: ERROR
        CALL MOVE_ALLOC(A, SELF%A, STAT = ERROR, ERRMSG = MESSAGE)
        IF (ERROR /= 0 ) THEN
            WRITE(*, *) ERROR, (MESSAGE == ' '), TRIM(MESSAGE)
            STOP
        END IF
    END SUBROUTINE P
END MODULE M

PROGRAM MAIN
    USE M
    IMPLICIT NONE
    TYPE(T) :: VAR
    TYPE(W), ALLOCATABLE :: A(:)
    ALLOCATE(A(1))
    CALL VAR%P(A)
END PROGRAM MAIN&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 01:48:39 GMT</pubDate>
    <dc:creator>OP1</dc:creator>
    <dc:date>2022-03-10T01:48:39Z</dc:date>
    <item>
      <title>Issue with MOVE_ALLOC</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1367383#M160519</link>
      <description>&lt;P&gt;The following code prints out a non-zero value for ERROR (the value is -858993460). I don't understand how MOVE_ALLOC fails here.&lt;/P&gt;
&lt;P&gt;This is with Intel Fortran Compiler Classic 2021.5.0, on Windows 10, x64, non-coarray code.&lt;/P&gt;
&lt;P&gt;It also looks like there is a non-printable character in MESSAGE - but that's probably a different problem.&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;MODULE M
    IMPLICIT NONE
    TYPE :: W
    END TYPE W
    TYPE :: T
        TYPE(W), ALLOCATABLE :: A(:)
        CONTAINS
            PROCEDURE :: P
    END TYPE T
    CONTAINS
    SUBROUTINE P(SELF, A)
        IMPLICIT NONE
        CLASS(T), INTENT(INOUT) :: SELF
        TYPE(W), ALLOCATABLE, INTENT(INOUT) :: A(:)
        CHARACTER(LEN = 132) :: MESSAGE
        INTEGER :: ERROR
        CALL MOVE_ALLOC(A, SELF%A, STAT = ERROR, ERRMSG = MESSAGE)
        IF (ERROR /= 0 ) THEN
            WRITE(*, *) ERROR, (MESSAGE == ' '), TRIM(MESSAGE)
            STOP
        END IF
    END SUBROUTINE P
END MODULE M

PROGRAM MAIN
    USE M
    IMPLICIT NONE
    TYPE(T) :: VAR
    TYPE(W), ALLOCATABLE :: A(:)
    ALLOCATE(A(1))
    CALL VAR%P(A)
END PROGRAM MAIN&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 01:48:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1367383#M160519</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2022-03-10T01:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with MOVE_ALLOC</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1369464#M160646</link>
      <description>&lt;P&gt;I just tried this using ifort 2021.5.0 on both Linux and Windows.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No error message printed on either OS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 21:24:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1369464#M160646</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2022-03-16T21:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with MOVE_ALLOC</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1369678#M160656</link>
      <description>&lt;P&gt;Barbra,&lt;/P&gt;
&lt;P&gt;The issue was, on no error condition, the STAT= variable would be left untouched.&lt;/P&gt;
&lt;P&gt;Therefore, should you have run your test from a Debug build, it would have pre-initialized the STAT variable ERROR with 0, and thus would not be a conclusive test.&amp;nbsp;A proper test would be to pre-set the STAT variable ERROR to non-zero before the call to MOVE_ALLOC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, you may have done this with your test program, but the sample program, and your reply, give no assurance that you had done so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 12:55:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1369678#M160656</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2022-03-17T12:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with MOVE_ALLOC</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1369724#M160664</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/44501"&gt;@Barbara_P_Intel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please see this other thread by OP and comments in there re: debug compile (/Od) and the treatment of the optional STAT= dummy argument as possibly INTENT(INOUT) versus INTENT(OUT) per the standard, and Ron Green's investigation, etc.&amp;nbsp; Some or all of it may be relevant to this thread also:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1368121#M160577" target="_blank"&gt;https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1368121#M160577&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 14:58:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1369724#M160664</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2022-03-17T14:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with MOVE_ALLOC</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1369733#M160670</link>
      <description>&lt;P&gt;Thanks for the clarification. My experience is mostly on Linux. I have limited experience with Windows and VS. I learned something new!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 15:19:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-MOVE-ALLOC/m-p/1369733#M160670</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2022-03-17T15:19:14Z</dc:date>
    </item>
  </channel>
</rss>

