<?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 Re: Function returning pointer to class data in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742025#M1315</link>
    <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
There's nothing else you need do - I'll track the issue and update this thread when there is news. If you find other issues, please let us know.&lt;BR /&gt;&lt;BR /&gt;Update 4 is coming out in the next week or so - the issue you reported here isn't fixed in that.&lt;BR /&gt;</description>
    <pubDate>Tue, 08 Dec 2009 14:05:55 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2009-12-08T14:05:55Z</dc:date>
    <item>
      <title>Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742016#M1306</link>
      <description>You'll have to excuse me if I do not format correctly, this is my first post. I am recieving an error when trying to use a function that returns a pointer to some class data and am unclear why this would happen (ifort (IFORT) 11.1 20091012). Let me draw up some modules.&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[plain]module typeAmodule&lt;BR /&gt;implicit none&lt;BR /&gt;private&lt;BR /&gt;public :: A, GetPtrB&lt;BR /&gt;type A&lt;BR /&gt;private&lt;BR /&gt;type(B), pointer:: ptrB&lt;BR /&gt;end type&lt;BR /&gt;contains&lt;BR /&gt;function GetPtrB(typA) return(res)&lt;BR /&gt;type(A)::typA&lt;BR /&gt;type(B), pointer::res&lt;BR /&gt;res =&amp;gt; typeA%ptrB&lt;BR /&gt;end function GetPtrB&lt;BR /&gt;end module typeAmodule&lt;BR /&gt;&lt;BR /&gt;module typeCclass&lt;BR /&gt;use typeAmodule&lt;BR /&gt;implicit none&lt;BR /&gt;private&lt;BR /&gt;public :: C&lt;BR /&gt;type, extends(anotherClass)::C&lt;BR /&gt;type(A), pointer::ptrA&lt;BR /&gt;contains&lt;BR /&gt;procedure, public, pass :: GetB&lt;BR /&gt;end typeC&lt;BR /&gt;contains&lt;BR /&gt;function GetB(typC) result(res)&lt;BR /&gt;class(C), intent(in)::typC&lt;BR /&gt;type(B), pointer::res&lt;BR /&gt;res =&amp;gt; GetPtrB(typC%ptrA)&lt;BR /&gt;end function GetB&lt;BR /&gt;end module typeCclass&lt;BR /&gt;&lt;BR /&gt;program SomeProgram&lt;BR /&gt;include typeCclass&lt;BR /&gt;implicit none&lt;BR /&gt;type(C)::typC&lt;BR /&gt;type(B), pointer::ptrB&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;ptrB =&amp;gt; typC%GetB()    !&amp;lt;&amp;lt;----&lt;BR /&gt;end program SomeProgram[/plain]&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;The compiling error I get is "error #6678: When the target is an expression it must deliver a pointer result." at the line marked with the '!&amp;lt;&amp;lt;----'. What I don't understand is the function 'GetB' is returning a pointer result, 'type(B), pointer', and is almost exactly like the function 'GetPtrB' except it is defined in the class, not as a subroutine accessing data in a type. I have done some research online, and as far as I can tell, I am using the function correctly. Any help is greatly appreciated, and please ask any questions if you need more clarification.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 15:57:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742016#M1306</guid>
      <dc:creator>lopes8070</dc:creator>
      <dc:date>2009-12-04T15:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742017#M1307</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Please post a compilable example. Your paraphrase here has too many errors and missing declarations. ("return" instead of "result", "include" instead of "use", no declaration for B, etc.) It is impossible to tell what the real problem is.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 16:18:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742017#M1307</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-12-04T16:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742018#M1308</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;Please post a compilable example. Your paraphrase here has too many errors and missing declarations. ("return" instead of "result", "include" instead of "use", no declaration for B, etc.) It is impossible to tell what the real problem is.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Sorry for the bad, quick programming. Here is a (non)compilable program that reproduces the result. As you can see the function GetCA returns a pointer, but the compiler throws an error saying it doesn't. I'm sure I'm not programming correctly, but after researching this problem on the internet for a few days, I am at my wits end as to what error I am doing. I'm grateful for any help you can provide.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 16:46:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742018#M1308</guid>
      <dc:creator>lopes8070</dc:creator>
      <dc:date>2009-12-04T16:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742019#M1309</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Ok. I agree that the error seems suspect. I'll run this by the developers.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 17:04:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742019#M1309</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-12-04T17:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742020#M1310</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Ok. I agree that the error seems suspect. I'll run this by the developers.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I'm sorry for my ignorance, but what happens now? Do I wait for a replay to this thread, or just wait for it to be address on next release?&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 17:12:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742020#M1310</guid>
      <dc:creator>lopes8070</dc:creator>
      <dc:date>2009-12-04T17:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742021#M1311</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;I will update this thread as I learn more. Perhaps I'll find a workaround. If it is really a bug, it will be fixed in a future update and I'll say so.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 17:21:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742021#M1311</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-12-04T17:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742022#M1312</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;I will update this thread as I learn more. Perhaps I'll find a workaround. If it is really a bug, it will be fixed in a future update and I'll say so.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;For anyone else who runs into this problem, a workaround, albiet a bad one, is to declare the variable in ClassC public and call the access routines in TypeB directly.&lt;BR /&gt;&lt;BR /&gt;use TypeBModule&lt;BR /&gt;ptrA =&amp;gt; GetAB(classC%ptrB)&lt;BR /&gt;instead of&lt;BR /&gt;ptrA =&amp;gt; classC%GetCA()&lt;BR /&gt;&lt;BR /&gt;However, this is not the way it should be done because it changes variable in the C class to public, ruining the encapsulation.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 17:42:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742022#M1312</guid>
      <dc:creator>lopes8070</dc:creator>
      <dc:date>2009-12-04T17:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742023#M1313</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
Our issue ID is DPD200148269.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2009 18:26:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742023#M1313</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-12-04T18:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742024#M1314</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Our issue ID is DPD200148269.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Hey Steve,&lt;BR /&gt;Thanks for your timely response on this. At least now I know I'm not going crazy. is there anything I should do with that issue ID to track this bug or continue to sit and wait. I am also running into similar problems with procedure calls inside of a class (though I can't reproduce this bug at this time, i.e. haven't tried yet).&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Dec 2009 20:36:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742024#M1314</guid>
      <dc:creator>lopes8070</dc:creator>
      <dc:date>2009-12-07T20:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742025#M1315</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
There's nothing else you need do - I'll track the issue and update this thread when there is news. If you find other issues, please let us know.&lt;BR /&gt;&lt;BR /&gt;Update 4 is coming out in the next week or so - the issue you reported here isn't fixed in that.&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Dec 2009 14:05:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742025#M1315</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-12-08T14:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742026#M1316</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; There's nothing else you need do - I'll track the issue and update this thread when there is news. If you find other issues, please let us know.&lt;BR /&gt;&lt;BR /&gt;Update 4 is coming out in the next week or so - the issue you reported here isn't fixed in that.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I am trying to reproduce the 2 or 3 other bugs but, as you can image, it's difficult. It throws an error in my code, but when I try to reproduce it in the demo code, it works fine. sigh... I'll try to get it to work.&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Dec 2009 14:32:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742026#M1316</guid>
      <dc:creator>lopes8070</dc:creator>
      <dc:date>2009-12-08T14:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742027#M1317</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/455431"&gt;lopes8070&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;I am trying to reproduce the 2 or 3 other bugs but, as you can image, it's difficult. It throws an error in my code, but when I try to reproduce it in the demo code, it works fine. sigh... I'll try to get it to work.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I am also running into this message a lot:&lt;BR /&gt;&lt;BR /&gt;: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.&lt;BR /&gt;&lt;BR /&gt;as well as,&lt;BR /&gt;&lt;BR /&gt;: error #6618: The INTERFACE/CONTAINS stack is full. This means that modules are being 'used' in a circular way.&lt;BR /&gt;&lt;BR /&gt;But I do not have any circular 'use' statements. I can honestly say, I have no clue what either of these mean. The first time I go the second error, I was able to avoid it by not using interfaces to class procedures, but now I am getting it no matter what (with no interfaces to class procedures). I have no work around as of yet, for the catastrophic error.&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Dec 2009 16:19:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742027#M1317</guid>
      <dc:creator>lopes8070</dc:creator>
      <dc:date>2009-12-08T16:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742028#M1318</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;The first is almost always a compiler bug. Please provide us a test case and tell us what switches you used.&lt;BR /&gt;&lt;BR /&gt;The second might also be a compiler bug, but hard to say. Please provide us a test case.&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Dec 2009 21:17:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742028#M1318</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-12-08T21:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742029#M1319</link>
      <description>The 6678 error is fixed, and the fix should appear in Update 6. The 6618 issue is being investigated as issue DPD200152345.</description>
      <pubDate>Tue, 30 Mar 2010 14:49:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742029#M1319</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-03-30T14:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Function returning pointer to class data</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742030#M1320</link>
      <description>The 6678 issue is fixed in Update 6, available now. The 6618 issue is not yet fixed.</description>
      <pubDate>Fri, 23 Apr 2010 20:10:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Function-returning-pointer-to-class-data/m-p/742030#M1320</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-04-23T20:10:53Z</dc:date>
    </item>
  </channel>
</rss>

