<?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 unexplained exception disappears with /check:pointer or other strange conditions in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/unexplained-exception-disappears-with-check-pointer-or-other/m-p/906899#M82306</link>
    <description>&lt;P&gt;(I'm using 10.1.4161.2005)&lt;BR /&gt;I have a Fortran library that is called from VC++ and calls several C++ methods. I am changing the interface declarations for calls out to C++ to use ISO_C_BINDING. After making these changes, when running in release an exception occurs in the Fortran code. I tracked it down (by debugging the C++ code) and it seems to occur immediately after returning from the C++ function that is called by my Fortran code. I have found that putting a WRITE statement before and after the function call eliminates the exception. Also setting Omit Frame Pointers to No or using /check:pointer eliminates the problem. The data passed to and from the C++ seems valid. &lt;BR /&gt;I have pasted the Fortran interface declaration and C++ function declaration for the function that I am calling in the Fortran code. I can't find any reason why this exception is occuring or why I can make it dissapear using the methods I listed. My understanding of /check:pointer is that it should report a problem so that it can be resolved, not eliminate the problem.&lt;BR /&gt;&lt;BR /&gt;Before:&lt;BR /&gt;interface&lt;BR /&gt;Integer function PointvectorLOS&lt;BR /&gt;&amp;amp; [C, ALIAS:'_PointVectorLOS']&lt;BR /&gt;&amp;amp; (Sourcept,Rayvector,MaxHits,NumHits,&lt;BR /&gt;&amp;amp; HitIdlist,HitTypelist,Entrypt,Exitpt,EntryNormal,&lt;BR /&gt;&amp;amp; ExitNormal, bSkipRubble)&lt;BR /&gt;&lt;BR /&gt;real Sourcept [REFERENCE]&lt;BR /&gt;real Rayvector [REFERENCE]&lt;BR /&gt;integer MaxHits [VALUE]&lt;BR /&gt;integer NumHits [REFERENCE]&lt;BR /&gt;integer HitIdlist [REFERENCE]&lt;BR /&gt;integer HitTypelist [REFERENCE]&lt;BR /&gt;real Entrypt [REFERENCE]&lt;BR /&gt;real Exitpt [REFERENCE]&lt;BR /&gt;real EntryNormal [REFERENCE]&lt;BR /&gt;real ExitNormal [REFERENCE]&lt;BR /&gt;logical bSkipRubble [VALUE]&lt;BR /&gt;&lt;BR /&gt;end function PointvectorLOS &lt;BR /&gt;end interface&lt;BR /&gt;&lt;BR /&gt;After:&lt;BR /&gt;interface&lt;BR /&gt;Integer(c_int) function PointvectorLOS&lt;BR /&gt;&amp;amp; (Sourcept,Rayvector,MaxHits,NumHits,&lt;BR /&gt;&amp;amp; HitIdlist,HitTypelist,Entrypt,Exitpt,EntryNormal,&lt;BR /&gt;&amp;amp; ExitNormal, bSkipRubble)&lt;BR /&gt;&amp;amp; bind(C,name='PointVectorLOS')&lt;BR /&gt;use ISO_C_BINDING &lt;BR /&gt;&lt;BR /&gt;real(c_float) :: Sourcept&lt;BR /&gt;real(c_float) :: Rayvector&lt;BR /&gt;integer(c_int), VALUE :: MaxHits&lt;BR /&gt;integer(c_int) :: NumHits&lt;BR /&gt;integer(c_int) :: HitIdlist&lt;BR /&gt;integer(c_int) :: HitTypelist&lt;BR /&gt;real(c_float) :: Entrypt&lt;BR /&gt;real(c_float) :: Exitpt&lt;BR /&gt;real(c_float) :: EntryNormal&lt;BR /&gt;real(c_float) :: ExitNormal&lt;BR /&gt;integer(c_int), VALUE :: bSkipRubble&lt;BR /&gt;&lt;BR /&gt;end function PointvectorLOS &lt;BR /&gt;end interface&lt;BR /&gt;&lt;BR /&gt;(I have made the appropriate changes for the change of bSkipRubble from logical to integer.)&lt;BR /&gt;&lt;BR /&gt;C++ declaration:&lt;BR /&gt;int PointVectorLOS( float *SourcePt, float *vect, int maxhits, int *NumHits, int *HitIDList, &lt;BR /&gt;int *ibHitTypeList, float *EntryPt, float *ExitPt, float *EntryNormal, float *ExitNormal, int bSkipRubble);&lt;/P&gt;</description>
    <pubDate>Tue, 20 Oct 2009 21:34:27 GMT</pubDate>
    <dc:creator>TheClassic</dc:creator>
    <dc:date>2009-10-20T21:34:27Z</dc:date>
    <item>
      <title>unexplained exception disappears with /check:pointer or other strange conditions</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/unexplained-exception-disappears-with-check-pointer-or-other/m-p/906899#M82306</link>
      <description>&lt;P&gt;(I'm using 10.1.4161.2005)&lt;BR /&gt;I have a Fortran library that is called from VC++ and calls several C++ methods. I am changing the interface declarations for calls out to C++ to use ISO_C_BINDING. After making these changes, when running in release an exception occurs in the Fortran code. I tracked it down (by debugging the C++ code) and it seems to occur immediately after returning from the C++ function that is called by my Fortran code. I have found that putting a WRITE statement before and after the function call eliminates the exception. Also setting Omit Frame Pointers to No or using /check:pointer eliminates the problem. The data passed to and from the C++ seems valid. &lt;BR /&gt;I have pasted the Fortran interface declaration and C++ function declaration for the function that I am calling in the Fortran code. I can't find any reason why this exception is occuring or why I can make it dissapear using the methods I listed. My understanding of /check:pointer is that it should report a problem so that it can be resolved, not eliminate the problem.&lt;BR /&gt;&lt;BR /&gt;Before:&lt;BR /&gt;interface&lt;BR /&gt;Integer function PointvectorLOS&lt;BR /&gt;&amp;amp; [C, ALIAS:'_PointVectorLOS']&lt;BR /&gt;&amp;amp; (Sourcept,Rayvector,MaxHits,NumHits,&lt;BR /&gt;&amp;amp; HitIdlist,HitTypelist,Entrypt,Exitpt,EntryNormal,&lt;BR /&gt;&amp;amp; ExitNormal, bSkipRubble)&lt;BR /&gt;&lt;BR /&gt;real Sourcept [REFERENCE]&lt;BR /&gt;real Rayvector [REFERENCE]&lt;BR /&gt;integer MaxHits [VALUE]&lt;BR /&gt;integer NumHits [REFERENCE]&lt;BR /&gt;integer HitIdlist [REFERENCE]&lt;BR /&gt;integer HitTypelist [REFERENCE]&lt;BR /&gt;real Entrypt [REFERENCE]&lt;BR /&gt;real Exitpt [REFERENCE]&lt;BR /&gt;real EntryNormal [REFERENCE]&lt;BR /&gt;real ExitNormal [REFERENCE]&lt;BR /&gt;logical bSkipRubble [VALUE]&lt;BR /&gt;&lt;BR /&gt;end function PointvectorLOS &lt;BR /&gt;end interface&lt;BR /&gt;&lt;BR /&gt;After:&lt;BR /&gt;interface&lt;BR /&gt;Integer(c_int) function PointvectorLOS&lt;BR /&gt;&amp;amp; (Sourcept,Rayvector,MaxHits,NumHits,&lt;BR /&gt;&amp;amp; HitIdlist,HitTypelist,Entrypt,Exitpt,EntryNormal,&lt;BR /&gt;&amp;amp; ExitNormal, bSkipRubble)&lt;BR /&gt;&amp;amp; bind(C,name='PointVectorLOS')&lt;BR /&gt;use ISO_C_BINDING &lt;BR /&gt;&lt;BR /&gt;real(c_float) :: Sourcept&lt;BR /&gt;real(c_float) :: Rayvector&lt;BR /&gt;integer(c_int), VALUE :: MaxHits&lt;BR /&gt;integer(c_int) :: NumHits&lt;BR /&gt;integer(c_int) :: HitIdlist&lt;BR /&gt;integer(c_int) :: HitTypelist&lt;BR /&gt;real(c_float) :: Entrypt&lt;BR /&gt;real(c_float) :: Exitpt&lt;BR /&gt;real(c_float) :: EntryNormal&lt;BR /&gt;real(c_float) :: ExitNormal&lt;BR /&gt;integer(c_int), VALUE :: bSkipRubble&lt;BR /&gt;&lt;BR /&gt;end function PointvectorLOS &lt;BR /&gt;end interface&lt;BR /&gt;&lt;BR /&gt;(I have made the appropriate changes for the change of bSkipRubble from logical to integer.)&lt;BR /&gt;&lt;BR /&gt;C++ declaration:&lt;BR /&gt;int PointVectorLOS( float *SourcePt, float *vect, int maxhits, int *NumHits, int *HitIDList, &lt;BR /&gt;int *ibHitTypeList, float *EntryPt, float *ExitPt, float *EntryNormal, float *ExitNormal, int bSkipRubble);&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2009 21:34:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/unexplained-exception-disappears-with-check-pointer-or-other/m-p/906899#M82306</guid>
      <dc:creator>TheClassic</dc:creator>
      <dc:date>2009-10-20T21:34:27Z</dc:date>
    </item>
  </channel>
</rss>

