<?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 Neither of these are standard in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939961#M89754</link>
    <description>&lt;P&gt;Neither of these are standard-conforming as they violate this constraint from F2008:&lt;/P&gt;

&lt;P&gt;C506 (R503) An initialization shall not appear if object-name is a dummy argument, a function result, an object in a named common block unless the type declaration is in a block data program unit, an object in blank common, an allocatable variable, or an automatic object.&lt;/P&gt;

&lt;P&gt;In the second case, the compiler notices you are trying to SAVE a dummy argument, which is not allowed. But it should also reject the initialization. I will report this to the developers.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Dec 2013 16:45:23 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2013-12-17T16:45:23Z</dc:date>
    <item>
      <title>pointer initialization with =&gt;null()</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939959#M89752</link>
      <description>&lt;P&gt;I am puzzled why this program compiles program ntest interface subroutine itakepointer(p) integer, dimension(:), pointer :: p =&amp;gt; null() end subroutine itakepointer end interface end program ntest I do ifort -stand f95 -warn all ntest.f90 If I explicitly add `save' it fails program ntest interface subroutine itakepointer(p) integer, dimension(:), pointer, save :: p =&amp;gt; null() end subroutine itakepointer end interface end program ntest ntest.f90(4): error #6453: The SAVE attribute conflicts with other declarations. &lt;/P&gt;&lt;P&gt; integer, dimension(:), pointer, save :: p =&amp;gt; null() -----------------------------------------------^ compilation aborted for ntest.f90 (code 1) For me it seems the following part of the standard implies that those two programs should be equivalent and not confirming. &lt;A href="http://j3-fortran.org/doc/standing/archive/007/97-007r2/ascii/c05.txt" target="_blank"&gt;http://j3-fortran.org/doc/standing/archive/007/97-007r2/ascii/c05.txt&lt;/A&gt; If initialization is =&amp;gt;NULL (), object-name shall be a pointer, and its initial association status is disassociated. Use of =&amp;gt;NULL () in a scoping unit is a reference to the intrinsic function NULL. The presence of initialization implies that object-name is saved, except for an object-name in a named common block or an object-name with the PARAMETER attribute. The implied SAVE attribute may be reaffirmed by explicit use of the SAVE attribute in the type declaration statement, or by inclusion of the object-name in a SAVE statement (5.2.4). ifort version 13.1.1 Linux 2.6.37.6-24-desktop #1 SMP PREEMPT 2012-10-18 22:36:08 +0200 x86_64 x86_64 x86_64 GNU/Linux&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 14:50:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939959#M89752</guid>
      <dc:creator>Sergey_L_</dc:creator>
      <dc:date>2013-12-17T14:50:43Z</dc:date>
    </item>
    <item>
      <title>I am puzzled why this program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939960#M89753</link>
      <description>&lt;P&gt;I am puzzled why this program compiles&lt;/P&gt;

&lt;P&gt;program ntest&lt;BR /&gt;
	&amp;nbsp; interface&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subroutine itakepointer(p)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer, dimension(:), pointer :: p =&amp;gt; null()&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end subroutine itakepointer&lt;BR /&gt;
	&amp;nbsp; end interface&lt;BR /&gt;
	end program ntest&lt;/P&gt;

&lt;P&gt;I do&lt;BR /&gt;
	ifort -stand f95&amp;nbsp; -warn all ntest.f90&lt;/P&gt;

&lt;P&gt;If I explicitly add `save' it fails&lt;BR /&gt;
	program ntest&lt;BR /&gt;
	&amp;nbsp; interface&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subroutine itakepointer(p)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer, dimension(:), pointer, save :: p =&amp;gt; null()&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end subroutine itakepointer&lt;BR /&gt;
	&amp;nbsp; end interface&lt;BR /&gt;
	end program ntest&lt;/P&gt;

&lt;P&gt;ntest.f90(4): error #6453: The SAVE attribute conflicts with other declarations.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer, dimension(:), pointer, save :: p =&amp;gt; null()&lt;BR /&gt;
	-----------------------------------------------^&lt;BR /&gt;
	compilation aborted for ntest.f90 (code 1)&lt;/P&gt;

&lt;P&gt;For me it seems the following part of the standard implies that those&lt;BR /&gt;
	two programs should be equivalent and not confirming.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://j3-fortran.org/doc/standing/archive/007/97-007r2/ascii/c05.txt" target="_blank"&gt;http://j3-fortran.org/doc/standing/archive/007/97-007r2/ascii/c05.txt&lt;/A&gt;&lt;BR /&gt;
	If initialization is =&amp;gt;NULL (), object-name shall be a pointer, and&lt;BR /&gt;
	its initial association status is disassociated.&amp;nbsp; Use of =&amp;gt;NULL () in&lt;BR /&gt;
	a scoping unit is a reference to the intrinsic function NULL.&lt;/P&gt;

&lt;P&gt;The presence of initialization implies that object-name is saved,&lt;BR /&gt;
	except for an object-name in a named common block or an object-name&lt;BR /&gt;
	with the PARAMETER attribute.&amp;nbsp; The implied SAVE attribute may be&lt;BR /&gt;
	reaffirmed by explicit use of the SAVE attribute in the type&lt;BR /&gt;
	declaration statement, or by inclusion of the object-name in a SAVE&lt;BR /&gt;
	statement (5.2.4).&lt;/P&gt;

&lt;P&gt;ifort version 13.1.1&lt;BR /&gt;
	Linux 2.6.37.6-24-desktop #1 SMP PREEMPT 2012-10-18 22:36:08 +0200 x86_64 x86_64 x86_64 GNU/Linux&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 15:15:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939960#M89753</guid>
      <dc:creator>Sergey_L_</dc:creator>
      <dc:date>2013-12-17T15:15:01Z</dc:date>
    </item>
    <item>
      <title>Neither of these are standard</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939961#M89754</link>
      <description>&lt;P&gt;Neither of these are standard-conforming as they violate this constraint from F2008:&lt;/P&gt;

&lt;P&gt;C506 (R503) An initialization shall not appear if object-name is a dummy argument, a function result, an object in a named common block unless the type declaration is in a block data program unit, an object in blank common, an allocatable variable, or an automatic object.&lt;/P&gt;

&lt;P&gt;In the second case, the compiler notices you are trying to SAVE a dummy argument, which is not allowed. But it should also reject the initialization. I will report this to the developers.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 16:45:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939961#M89754</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-12-17T16:45:23Z</dc:date>
    </item>
    <item>
      <title>I'd argue that your first</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939962#M89755</link>
      <description>&lt;P&gt;I'd argue that your first program (without save) should also fail to compile because p is a dummy argument.&lt;/P&gt;

&lt;P&gt;According to Metcalf, Reid, and Cohen, Fortran 95/2003 explained (7.5.3), a pointer that is initialised in its declaration must not be a dummy argument or function result.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 16:48:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939962#M89755</guid>
      <dc:creator>Mark_Lewy</dc:creator>
      <dc:date>2013-12-17T16:48:23Z</dc:date>
    </item>
    <item>
      <title>I think Steve is agreeing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939963#M89756</link>
      <description>&lt;P&gt;I think Steve is agreeing with you.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2013 17:21:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939963#M89756</guid>
      <dc:creator>Izaak_Beekman</dc:creator>
      <dc:date>2013-12-20T17:21:08Z</dc:date>
    </item>
    <item>
      <title>I think Mark and I were</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939964#M89757</link>
      <description>&lt;P&gt;I think Mark and I were posting at the same time. Both of us agree that the programs are incorrect and that the compiler should reject both.&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2013 18:07:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/pointer-initialization-with-gt-null/m-p/939964#M89757</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-12-20T18:07:29Z</dc:date>
    </item>
  </channel>
</rss>

