<?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 IFWINTY and NULL Pointers in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090667#M124153</link>
    <description>&lt;PRE class="brush:fortran;"&gt;        bret =  CreateProcess (NULL_CHARACTER,gnam, &amp;amp;         ! Application Name, cmdline
                    NULL_SECURITY_ATTRIBUTES, &amp;amp;
                    NULL_SECURITY_ATTRIBUTES, &amp;amp;
                    TRUE, &amp;amp;                                   ! InheritHandles
                    0, &amp;amp;                                      ! CreationFlags CREATE_NEW_CONSOLE
                    NULL, &amp;amp;                                   ! Environment variables
                    NULL_CHARACTER, &amp;amp;                         ! Current directory
                    StartupInfo, &amp;amp;
                    ProcessInfo)                              ! process id etc returned&lt;/PRE&gt;

&lt;P&gt;With&amp;nbsp;&amp;nbsp;2017 update 1 and &amp;nbsp;/check:pointer set all the NULL_xxx args give a run time error. In IFWINTY they are are declared as pointers to the specifics types. Shouldn't those be initialised with the NULL() instrinsic? I am slightly confused as I think in my mind that compiled OK with 16 and 17 original but I would need to make a test case as the full source will only compile in the latest compiler because of bug fixes only in that one.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Nov 2016 09:34:36 GMT</pubDate>
    <dc:creator>andrew_4619</dc:creator>
    <dc:date>2016-11-18T09:34:36Z</dc:date>
    <item>
      <title>IFWINTY and NULL Pointers</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090667#M124153</link>
      <description>&lt;PRE class="brush:fortran;"&gt;        bret =  CreateProcess (NULL_CHARACTER,gnam, &amp;amp;         ! Application Name, cmdline
                    NULL_SECURITY_ATTRIBUTES, &amp;amp;
                    NULL_SECURITY_ATTRIBUTES, &amp;amp;
                    TRUE, &amp;amp;                                   ! InheritHandles
                    0, &amp;amp;                                      ! CreationFlags CREATE_NEW_CONSOLE
                    NULL, &amp;amp;                                   ! Environment variables
                    NULL_CHARACTER, &amp;amp;                         ! Current directory
                    StartupInfo, &amp;amp;
                    ProcessInfo)                              ! process id etc returned&lt;/PRE&gt;

&lt;P&gt;With&amp;nbsp;&amp;nbsp;2017 update 1 and &amp;nbsp;/check:pointer set all the NULL_xxx args give a run time error. In IFWINTY they are are declared as pointers to the specifics types. Shouldn't those be initialised with the NULL() instrinsic? I am slightly confused as I think in my mind that compiled OK with 16 and 17 original but I would need to make a test case as the full source will only compile in the latest compiler because of bug fixes only in that one.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 09:34:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090667#M124153</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2016-11-18T09:34:36Z</dc:date>
    </item>
    <item>
      <title>There was a post (within 2-3</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090668#M124154</link>
      <description>&lt;P&gt;There was a post (within 2-3 weeks) where it was found that the Windows interface declarations were in error (Steve may recall this). Perhaps your issue is related. This was 32-bit vs 64-bit oversight.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 13:52:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090668#M124154</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-11-18T13:52:58Z</dc:date>
    </item>
    <item>
      <title>Interesting. This would have</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090669#M124155</link>
      <description>&lt;P&gt;Interesting. This would have failed in 16.0 as well. Just use NULL for these arguments. &amp;nbsp;Initializing them to NULL() would not change the behavior. Some time ago we change the interface for CreateProcess to take the arguments by reference but with IGNORE_LOC and ALLOW_NULL. This allows you to use a constant zero as an argument even though the type doesn't match. But when you pass a pointer, the compiler thinks you're accessing the value and gives the "null pointer" error if you have enabled pointer checking. I don't think it should here, and I believe I already reported this as an issue, but if not I will do so.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 14:05:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090669#M124155</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-18T14:05:22Z</dc:date>
    </item>
    <item>
      <title>Easy enough to fix in several</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090670#M124156</link>
      <description>&lt;P&gt;Easy enough to fix in several different ways but:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;        bret =  CreateProcess ( &amp;amp;
                   NULL(NULL_CHARACTER),gnam, &amp;amp;         ! Application Name, cmdline
                   NULL(NULL_SECURITY_ATTRIBUTES), &amp;amp;
                   NULL(NULL_SECURITY_ATTRIBUTES), &amp;amp;
                   TRUE, &amp;amp;                              ! InheritHandles
                   0, &amp;amp;                                 ! CreationFlags CREATE_NEW_CONSOLE
                   NULL0, &amp;amp;                             ! Environment variables
                   NULL(NULL_CHARACTER), &amp;amp;              ! Current directory
                   StartupInfo, &amp;amp;                       ! populated attributes T_STARTUPINFO strucure
                   ProcessInfo)                         ! process id etc returned&lt;/PRE&gt;

&lt;P&gt;Works with no problem as we are passing a pointer of the correct type that is initialised to zero. I think the compiler is complaining about &amp;nbsp;the pointers being uninitialised. In Iwfinty we have:&amp;nbsp;&lt;/P&gt;

&lt;P&gt;type(T_SECURITY_ATTRIBUTES), pointer :: null_security_attributes&amp;nbsp;&lt;/P&gt;

&lt;P&gt;To to my mind that should be:&lt;/P&gt;

&lt;P&gt;type(T_SECURITY_ATTRIBUTES), pointer :: null_security_attributes = null()&lt;/P&gt;

&lt;P&gt;What I don't understand is what has changed.......&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 16:14:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090670#M124156</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2016-11-18T16:14:51Z</dc:date>
    </item>
    <item>
      <title>My experiments show that</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090671#M124157</link>
      <description>&lt;P&gt;My experiments show that nothing has changed - I can reproduce the problem going back to 12.0. Initializing the pointer to NULL() didn't change the behavior for me. At most I can theorize that if the pointer was not initialized, it might have some non-zero value that bypassed the check, but then the API call would almost certainly fail.&lt;/P&gt;

&lt;P&gt;I have requested, in issue&amp;nbsp;DPD200416141, that the compiler skip doing pointer checking for a dummy argument that has the ALLOW_NULL attribute, as most (but perhaps not all) of the relevant API declarations do. These APIs allow you to just put in NULL and that is the preferred solution. If you find APIs where this doesn't work, then I'd recommend &amp;nbsp;turning off pointer checking (it is not the default, even in a Debug configuration).&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 15:52:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090671#M124157</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-21T15:52:12Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;I have requested, in issue</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090672#M124158</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&lt;EM&gt;I have requested, in issue&amp;nbsp;DPD200416141, that the compiler skip doing pointer checking for a dummy argument that has the ALLOW_NULL attribute.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Wouldn't it be better to have the ALLOW_NULL attributed argument to permit NULL .OR. valid pointer?&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 16:41:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090672#M124158</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-11-21T16:41:23Z</dc:date>
    </item>
    <item>
      <title>It already allows NULL or a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090673#M124159</link>
      <description>&lt;P&gt;It already allows NULL or a valid pointer. The change would be to not do a null-pointer check for such arguments.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 16:51:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFWINTY-and-NULL-Pointers/m-p/1090673#M124159</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-21T16:51:17Z</dc:date>
    </item>
  </channel>
</rss>

