<?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 Steve, that is exactly the in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971010#M97135</link>
    <description>&lt;P&gt;Steve, that is exactly the problem. &amp;nbsp;Non-pointer rules for the protected attribute are being applied to a pointer.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2013 16:26:43 GMT</pubDate>
    <dc:creator>Brian1</dc:creator>
    <dc:date>2013-10-31T16:26:43Z</dc:date>
    <item>
      <title>Bug with protected pointer</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971006#M97131</link>
      <description>&lt;P&gt;I have found a bug with protected pointers in the Intel Fortran compiler.&lt;/P&gt;
&lt;P&gt;Section 5.1.2.12, lines 3-7 of the Fortran 2003 standard says, basically, that the association status of a pointer with the protected attribute cannot be changed outside of the module in which it is declared. &amp;nbsp;However, it is valid to define an object which is pointed to by such a pointer outside of the module.&lt;/P&gt;
&lt;P&gt;For some reason I am unable to attach a file to this message, so I've included the source code at the end of this post. &amp;nbsp;I tried compiling with Intel Fortran 12.1, 13.1, and 14.0. &amp;nbsp;All of them stop with the error message:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;bug.f90(23): error #7986: A use associated object that has the PROTECTED attribute shall not appear in a variable definition context. [AA]&lt;BR /&gt;aa = 1&lt;BR /&gt;--^&lt;BR /&gt;compilation aborted for bug.f90 (code 1)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The bug is that the Intel Fortran compiler is treating a protected pointer like a protected object, i.e. it is preventing it from being defined outside of the module.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;module module&lt;BR /&gt;implicit none&lt;BR /&gt;public&lt;/P&gt;
&lt;P&gt;integer, target, public :: a = 42&lt;BR /&gt;integer, pointer, protected :: aa =&amp;gt; null()&lt;/P&gt;
&lt;P&gt;contains&lt;/P&gt;
&lt;P&gt;subroutine alloc()&lt;BR /&gt;aa =&amp;gt; a&lt;BR /&gt;end subroutine alloc&lt;/P&gt;
&lt;P&gt;end module module&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;program program&lt;BR /&gt;use module&lt;BR /&gt;implicit none&lt;/P&gt;
&lt;P&gt;call alloc()&lt;BR /&gt;write (*,'(I0)') aa&lt;BR /&gt;aa = 1&lt;BR /&gt;write (*,'(I0)') aa&lt;/P&gt;
&lt;P&gt;end program program&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 31 Oct 2013 14:08:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971006#M97131</guid>
      <dc:creator>Brian1</dc:creator>
      <dc:date>2013-10-31T14:08:28Z</dc:date>
    </item>
    <item>
      <title>So the flagged assignment</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971007#M97132</link>
      <description>&lt;P&gt;So the flagged assignment statement should be assigning 1 to "a" not "aa" based on the description, correct?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 15:55:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971007#M97132</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-10-31T15:55:20Z</dc:date>
    </item>
    <item>
      <title>The description of PROTECTED</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971008#M97133</link>
      <description>&lt;P&gt;The description of PROTECTED changed somewhat in Fortran 2008 but Brian's complaint is still valid. F2008 says:&lt;/P&gt;
&lt;P&gt;"A pointer that has the PROTECTED attribute and is accessed by use association shall not appear in a pointer association context (16.6.8)." [F2008 C552]&lt;/P&gt;
&lt;P&gt;It looks to me as if the compiler is applying non-pointer rules here.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 16:08:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971008#M97133</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-10-31T16:08:24Z</dc:date>
    </item>
    <item>
      <title>I'm not sure what you mean. </title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971009#M97134</link>
      <description>&lt;P&gt;By the way, I believe this program remains valid and should produce the same output even if "a" is declared private in the module, but this is a separate matter from the bug I am reporting.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 16:24:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971009#M97134</guid>
      <dc:creator>Brian1</dc:creator>
      <dc:date>2013-10-31T16:24:00Z</dc:date>
    </item>
    <item>
      <title>Steve, that is exactly the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971010#M97135</link>
      <description>&lt;P&gt;Steve, that is exactly the problem. &amp;nbsp;Non-pointer rules for the protected attribute are being applied to a pointer.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 16:26:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971010#M97135</guid>
      <dc:creator>Brian1</dc:creator>
      <dc:date>2013-10-31T16:26:43Z</dc:date>
    </item>
    <item>
      <title>Ok, thank you. I reported the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971011#M97136</link>
      <description>&lt;P&gt;Ok, thank you.&amp;nbsp;I reported the issue to Development.&lt;/P&gt;
&lt;P&gt;(Internal tracking id: DPD200249513)&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 16:45:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bug-with-protected-pointer/m-p/971011#M97136</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-10-31T16:45:35Z</dc:date>
    </item>
  </channel>
</rss>

