<?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 Wrong ASSOCIATED behavior? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168033#M145058</link>
    <description>&lt;P&gt;This code compiles on Intel Fortran 2019, but according to the standard it should not.&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;PROGRAM isASSOCIATED
    IMPLICIT NONE
    
    TYPE PUNTO
	    INTEGER idpt
	    REAL(8),DIMENSION(3)::pt_loc
    END TYPE PUNTO

    TYPE VECTOR
	    INTEGER idpt
	    REAL(8),DIMENSION(3)::vc_loc
    END TYPE VECTOR

    TYPE(PUNTO),POINTER::pt
    TYPE(VECTOR),TARGET::vc

    IF(ASSOCIATED(pt,vc)) THEN
        PRINT *,"Pointer associated with target"
    ELSE
        PRINT *,"Pointer not associated with target"
    ENDIF
END PROGRAM isASSOCIATED&lt;/PRE&gt;

&lt;P&gt;The output of the program is of course the message&amp;nbsp;"Pointer not associated with target", but there is no way that the pointer can be associated with the target because they have different types.&lt;/P&gt;
&lt;P&gt;The standard says about the ASSOCIATED(pointer,[target]) that the target must have the same type as the pointer, nevertheless the Intel fortran documentation doesn't mention it. Is this an extension of Intel for some reason?&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jan 2020 18:09:51 GMT</pubDate>
    <dc:creator>Daniel_Dopico</dc:creator>
    <dc:date>2020-01-08T18:09:51Z</dc:date>
    <item>
      <title>Wrong ASSOCIATED behavior?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168033#M145058</link>
      <description>&lt;P&gt;This code compiles on Intel Fortran 2019, but according to the standard it should not.&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;PROGRAM isASSOCIATED
    IMPLICIT NONE
    
    TYPE PUNTO
	    INTEGER idpt
	    REAL(8),DIMENSION(3)::pt_loc
    END TYPE PUNTO

    TYPE VECTOR
	    INTEGER idpt
	    REAL(8),DIMENSION(3)::vc_loc
    END TYPE VECTOR

    TYPE(PUNTO),POINTER::pt
    TYPE(VECTOR),TARGET::vc

    IF(ASSOCIATED(pt,vc)) THEN
        PRINT *,"Pointer associated with target"
    ELSE
        PRINT *,"Pointer not associated with target"
    ENDIF
END PROGRAM isASSOCIATED&lt;/PRE&gt;

&lt;P&gt;The output of the program is of course the message&amp;nbsp;"Pointer not associated with target", but there is no way that the pointer can be associated with the target because they have different types.&lt;/P&gt;
&lt;P&gt;The standard says about the ASSOCIATED(pointer,[target]) that the target must have the same type as the pointer, nevertheless the Intel fortran documentation doesn't mention it. Is this an extension of Intel for some reason?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 18:09:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168033#M145058</guid>
      <dc:creator>Daniel_Dopico</dc:creator>
      <dc:date>2020-01-08T18:09:51Z</dc:date>
    </item>
    <item>
      <title>My read is for the pointers</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168034#M145059</link>
      <description>&lt;P&gt;My read is for the pointers to be associated they must be of the same type .AND. both pointing to the same location.&lt;/P&gt;&lt;P&gt;For the pointers to .NOT. be associated, one or both may be null .OR. both non-null pointing elsewhere. As to if a compiler error is to be generated, I am not sure as to if this behavior is "undefined".&lt;/P&gt;&lt;P&gt;It would be interesting to know the behavior of two different type pointers, initialized with C_F_POINTER to the same location (or overlapping locations).&lt;/P&gt;&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 19:02:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168034#M145059</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2020-01-08T19:02:40Z</dc:date>
    </item>
    <item>
      <title>It's just a failure to check</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168035#M145060</link>
      <description>&lt;P&gt;It's just a failure to check the types - I very much doubt it is a deliberate extension.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The standard doesn't say "the target must have the same type". What it says is:&lt;/P&gt;&lt;P&gt;TARGET (optional) shall be allowable as the data-target or proc-target in a pointer assignment statement (10.2.2)&amp;nbsp;in which POINTER is data-pointer-object or proc-pointer-object.&lt;/P&gt;&lt;P&gt;Nonetheless, it is evident that the use here is not conforming, as if you add:&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt; pt =&amp;gt; vc&lt;/PRE&gt;

&lt;P&gt;the compiler complains:&lt;/P&gt;

&lt;PRE class="brush:plain; class-name:dark;"&gt;error #6795: The target must be of the same type and kind type parameters as the pointer.   [PT]
    pt =&amp;gt; vc
----^&lt;/PRE&gt;

&lt;P&gt;Enabling standards checking doesn't complain about the ASSOCIATED. In other words, it's simply an omission, or a bug if you prefer. I suggest reporting this through the Online Service Portal.&lt;/P&gt;
&lt;P&gt;P.S. It would be a favor if an Intel person would edit the title to say ASSOCIATED rather than ASSOCIATE, which is something entirely different.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 19:08:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168035#M145060</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2020-01-08T19:08:02Z</dc:date>
    </item>
    <item>
      <title>Thank you Steve. Sorry for</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168036#M145061</link>
      <description>&lt;P&gt;Thank you Steve. Sorry for the typo in the topic title: as you said the ASSOCIATE construct is something completely different.&lt;/P&gt;&lt;P&gt;For me it is a bug too, but since the Intel documentation is not complete on this, I had doubts that this could be done on purpose (nevertheless if i am right a green color should be used for any intended extensión and this is not the case).&lt;/P&gt;&lt;P&gt;It would be welcome if they correct the bug and the documentation. I paste the documentation on the target here:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;target (Input; optional) Must be a pointer or target. If it is a pointer, the pointer association status must be defined.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I thik it should be advised that the target should be "pointable" by the pointer, as you said, otherwise a compiler error would be obtained.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 19:30:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168036#M145061</guid>
      <dc:creator>Daniel_Dopico</dc:creator>
      <dc:date>2020-01-08T19:30:44Z</dc:date>
    </item>
    <item>
      <title>I have just put a ticket on</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168037#M145062</link>
      <description>&lt;P&gt;I have just put a ticket on this.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 19:45:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168037#M145062</guid>
      <dc:creator>Daniel_Dopico</dc:creator>
      <dc:date>2020-01-08T19:45:14Z</dc:date>
    </item>
    <item>
      <title>Steve, aren't pointers that</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168038#M145063</link>
      <description>&lt;P&gt;Steve, aren't pointers that cannot be associated by definition .NOT. associated?&lt;/P&gt;&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 19:57:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168038#M145063</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2020-01-08T19:57:55Z</dc:date>
    </item>
    <item>
      <title>Jim, I don't understand your</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168039#M145064</link>
      <description>&lt;P&gt;Jim, I don't understand your question,. Any given pointer CAN be associated, with an allowed target. The issue here in ASSOCIATED is that the standard requires that TARGET be allowed as a pointer target for POINTER, which it isn't in this example. The proper behavior is a compile-time error similar to the one I show in #3. I could certainly modify the example to associate pt with something else.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 20:42:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1168039#M145064</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2020-01-08T20:42:50Z</dc:date>
    </item>
    <item>
      <title>Re:Wrong ASSOCIATED behavior?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1197430#M151082</link>
      <description>&lt;P&gt;This bug was fixed in PSXE 2020 Update 2, compiler 19.1.2&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Aug 2020 00:16:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-ASSOCIATED-behavior/m-p/1197430#M151082</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2020-08-05T00:16:12Z</dc:date>
    </item>
  </channel>
</rss>

