<?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 String pointers with DLLEXPORT in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796271#M35401</link>
    <description>Ok, this is a different problem than before. I can reproduce it and will escalate to development. The DLLEXPORT doesn't seem to be relevant here. ATTRIBUTES REFERENCE does need to be specified to see the problem. I'm not sure why you have that, however. What did you expect it to do?&lt;BR /&gt;&lt;BR /&gt;Issue ID is DPD200233584</description>
    <pubDate>Thu, 28 Jun 2012 18:39:10 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2012-06-28T18:39:10Z</dc:date>
    <item>
      <title>String pointers with DLLEXPORT</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796266#M35396</link>
      <description>I am using XE 2011.1.127, so it may be that this problem has been fixed...&lt;BR /&gt;&lt;BR /&gt;There appears to be a compiler error resulting from the following code segment:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt; module Junk&lt;BR /&gt; contains&lt;BR /&gt; function Test(pS,S1,S2)&lt;BR /&gt;!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, alias:"Test" :: Test&lt;BR /&gt; logical Test&lt;BR /&gt; character (*), pointer :: pS&lt;BR /&gt; character (*), intent(in), target :: S1&lt;BR /&gt; character (*), intent(in), target :: S2&lt;BR /&gt; integer (4), automatic :: iPS,iL1, iL2&lt;BR /&gt; iPS = len(pS)&lt;BR /&gt; iL1 = len(S1)&lt;BR /&gt; iL2 = len(S2)&lt;BR /&gt; pS =&amp;gt; S1&lt;BR /&gt; Test = .true.&lt;BR /&gt; return&lt;BR /&gt; end function&lt;BR /&gt; end module&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; program StringPointer&lt;BR /&gt; use Junk&lt;BR /&gt; character (32), pointer :: pS&lt;BR /&gt; logical bret&lt;/P&gt;&lt;P&gt; bret = Test(pS,'123','ABCDEFG')&lt;/P&gt;&lt;P&gt; end program StringPointer&lt;BR /&gt;&lt;BR /&gt;Inspection of the disassembled version demonstrates that with the DLLEXPORT directive then the code generated to call Test(..) has five parameters put on the stack: the addresses of the pointer pS and the two static strings, plus the length of the two static strings. No length associated with the string pointer pS is put on the stack. In contrast, the disassembly of the function shows that it is expecting six parameters, i.e., incluiding the length of pS. The corresponding values of iPS, iL1 and iL2 are 3, 7 and zero.&lt;BR /&gt;&lt;BR /&gt;Removing the DLLEXPORT causes the compiler to include a length for the pointer pS in both places.&lt;BR /&gt;&lt;BR /&gt;I can (and have) worked around this problem, but it took a while to track down the cause.&lt;BR /&gt;&lt;BR /&gt;Stuart&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2012 21:08:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796266#M35396</guid>
      <dc:creator>Dalziel__Stuart</dc:creator>
      <dc:date>2012-06-25T21:08:27Z</dc:date>
    </item>
    <item>
      <title>String pointers with DLLEXPORT</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796267#M35397</link>
      <description>Perhaps there are other problems, but note you are associating a non-deferred length pointer of length 32 with a target that has length 3. That's not legal.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Jun 2012 22:50:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796267#M35397</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2012-06-25T22:50:10Z</dc:date>
    </item>
    <item>
      <title>String pointers with DLLEXPORT</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796268#M35398</link>
      <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1340694177251="58" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=212570" href="https://community.intel.com/en-us/profile/212570/" class="basic"&gt;IanH&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;I&gt;Perhaps there are other problems, but note you are associating a non-deferred length pointer of length 32 with a target that has length 3. That's not legal.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;I agree that there are elements of my example that are not sensible, but it was just meant to illustrate the problem. I electeddifferent sizes here to help highlight what was happening to the size info butforgot to remove the pointer association from an earlier test.The software itself (~16MB of source total)is consistent aboutsizes of the strings, and indeed the problematic routine compiles perfectly OK under CVF.&lt;BR /&gt;&lt;BR /&gt;Stuart</description>
      <pubDate>Tue, 26 Jun 2012 07:09:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796268#M35398</guid>
      <dc:creator>Dalziel__Stuart</dc:creator>
      <dc:date>2012-06-26T07:09:35Z</dc:date>
    </item>
    <item>
      <title>String pointers with DLLEXPORT</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796269#M35399</link>
      <description>Please try a newer compiler. This problem looks like one we fixed a while ago.</description>
      <pubDate>Tue, 26 Jun 2012 11:33:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796269#M35399</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-06-26T11:33:38Z</dc:date>
    </item>
    <item>
      <title>String pointers with DLLEXPORT</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796270#M35400</link>
      <description>FWIW I still observe the apparent argument mismatch with 12.1.4.</description>
      <pubDate>Tue, 26 Jun 2012 20:16:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796270#M35400</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2012-06-26T20:16:44Z</dc:date>
    </item>
    <item>
      <title>String pointers with DLLEXPORT</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796271#M35401</link>
      <description>Ok, this is a different problem than before. I can reproduce it and will escalate to development. The DLLEXPORT doesn't seem to be relevant here. ATTRIBUTES REFERENCE does need to be specified to see the problem. I'm not sure why you have that, however. What did you expect it to do?&lt;BR /&gt;&lt;BR /&gt;Issue ID is DPD200233584</description>
      <pubDate>Thu, 28 Jun 2012 18:39:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796271#M35401</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-06-28T18:39:10Z</dc:date>
    </item>
    <item>
      <title>String pointers with DLLEXPORT</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796272#M35402</link>
      <description>This has been fixed for an update later this year (October or thereabouts).</description>
      <pubDate>Fri, 06 Jul 2012 14:51:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/String-pointers-with-DLLEXPORT/m-p/796272#M35402</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-07-06T14:51:00Z</dc:date>
    </item>
  </channel>
</rss>

