<?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 Thank you for reporting this in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124356#M132458</link>
    <description>&lt;P&gt;Thank you for reporting this access violation. I also reproduced this using PSXE 2016 Update 2 (ifort Version 16.0.2.180 Build 20160204) with VS 2015 (Version 14.0.23107.0 D14REL), and confirmed the exception does not occur with the PSXE 2016 Update 2 and VS 2013.&lt;/P&gt;

&lt;P&gt;I escalated this to our RTL team for further diagnosis and will let you know what I hear from them.&lt;/P&gt;

&lt;P&gt;I do not have VS 2015 Update 3 available but did include Tim’s details in the internal report.&lt;/P&gt;

&lt;P&gt;(Internal tracking id: DPD200412661)&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2016 16:28:11 GMT</pubDate>
    <dc:creator>Kevin_D_Intel</dc:creator>
    <dc:date>2016-07-14T16:28:11Z</dc:date>
    <item>
      <title>Intel/VS2015 access violation in mixed language program compiled with default -MT switch</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124354#M132456</link>
      <description>&lt;P&gt;I have a small main program written in Fortran (attached file main.f90) and it calls a simple function written in C (attached file myprintf.c). The C function just calls printf to output the value of its double precision argument (which is passed by reference as dictated by Fortran).&lt;/P&gt;

&lt;P&gt;I compile and link the two files like this:&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;  icl -MT -c myprintf.c
  ifort -MT main.f90 myprintf.obj&lt;/PRE&gt;

&lt;P&gt;When I run the program, it crashes with an access violation inside a Microsoft C run-time library print function (I can see where it is using the Visual Studio debugger)&lt;/P&gt;

&lt;P&gt;However, if I compile the files using the -MD switch, like this:&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;  icl -MD -c myprintf.c
  ifort -MD main.f90 myprintf.obj&lt;/PRE&gt;

&lt;P&gt;then there is no problem - the program runs and prints the expected results. Note that icl and ifort use -MT switches by default so if I omit them althoghether I still get the crash. Something else - if I remove the call of ieee_is_nan() from main.f90, the problem also goes away.&lt;/P&gt;

&lt;P&gt;I'm using ifort and icl initialized by a call of&lt;/P&gt;

&lt;PRE class="brush:;"&gt;  ifortvars.bat intel64 vs2015&lt;/PRE&gt;

&lt;P&gt;- in other words, telling the Intel compilers to interoperate with the latest Microsoft C. If I use an older version of Microsoft C instead, such as vs2013, then the problem goes away. So - I imagine that the issue is to do with the well-known refactoring of the Microsoft run-time libraries in VS2015.&lt;/P&gt;

&lt;P&gt;But - I'm using the latest versions of Intel and Microsoft compilers, which I thought were intended to work properly together. Here are my compiler versions:&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;  Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.3.207 Build 20160415
  Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.3.207 Build 20160415
  Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x64&lt;/PRE&gt;

&lt;P&gt;So - am I doing something wrong? Or are the compilers? Or what?&lt;/P&gt;

&lt;P&gt;I'd like to get this to work - this test program is cut down from a large amount of code. I work for a company making software libraries and many of our customers require the ability to link statically to libraries built with the -MT switch.&lt;/P&gt;

&lt;P&gt;Mick&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 10:00:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124354#M132456</guid>
      <dc:creator>Mick_Pont</dc:creator>
      <dc:date>2016-07-14T10:00:17Z</dc:date>
    </item>
    <item>
      <title>Reproduced here (with VS2015</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124355#M132457</link>
      <description>&lt;P&gt;Reproduced here (with VS2015.3).&lt;/P&gt;

&lt;P&gt;So it seems that writing to stdout in C is failing, when called from Fortran, with the VS2015 libraries.&lt;/P&gt;

&lt;P&gt;-MT is no longer the default, but it didn't seem to be needed to provoke the failure.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 11:12:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124355#M132457</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2016-07-14T11:12:00Z</dc:date>
    </item>
    <item>
      <title>Thank you for reporting this</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124356#M132458</link>
      <description>&lt;P&gt;Thank you for reporting this access violation. I also reproduced this using PSXE 2016 Update 2 (ifort Version 16.0.2.180 Build 20160204) with VS 2015 (Version 14.0.23107.0 D14REL), and confirmed the exception does not occur with the PSXE 2016 Update 2 and VS 2013.&lt;/P&gt;

&lt;P&gt;I escalated this to our RTL team for further diagnosis and will let you know what I hear from them.&lt;/P&gt;

&lt;P&gt;I do not have VS 2015 Update 3 available but did include Tim’s details in the internal report.&lt;/P&gt;

&lt;P&gt;(Internal tracking id: DPD200412661)&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 16:28:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124356#M132458</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2016-07-14T16:28:11Z</dc:date>
    </item>
    <item>
      <title>Thanks for escalating Kevin.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124357#M132459</link>
      <description>&lt;P&gt;Thanks for escalating Kevin.&lt;/P&gt;

&lt;P&gt;Note that the problem is not directly to do with stdout, it's actually crashing in binary-decimal conversion - using sprintf instead of printf shows the same problem.&lt;/P&gt;

&lt;P&gt;Also, despite what Tim thought, I think -MT *is* the compiler default - the output of ifort /? says so, and also compiling with -MD avoids the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 16:43:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124357#M132459</guid>
      <dc:creator>Mick_Pont</dc:creator>
      <dc:date>2016-07-14T16:43:03Z</dc:date>
    </item>
    <item>
      <title>The developers identified the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124358#M132460</link>
      <description>&lt;P&gt;The developers identified the root cause and we expect to have a fix in our next PSXE 2016 Update 4 release (mid-August timeframe).&lt;/P&gt;

&lt;P&gt;They found the use of ieee_c_exceptions leads to using Intel’s fegetenv, and that the most recent VS2015 now calls fegetenv() when processing formats %f or %d. However, MS expects their own version of fegetenv, which differs from Intel’s. Since the size of the fenv_t object used by fegetenv() is different in our and MS’s libraries, it causes the segmentation fault.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 14:02:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124358#M132460</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2016-07-26T14:02:23Z</dc:date>
    </item>
    <item>
      <title>Brill - thanks - I look</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124359#M132461</link>
      <description>&lt;P&gt;Brill - thanks - I look forward to the fixed version&lt;/P&gt;

&lt;P&gt;Mick&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 14:59:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124359#M132461</guid>
      <dc:creator>Mick_Pont</dc:creator>
      <dc:date>2016-07-26T14:59:47Z</dc:date>
    </item>
    <item>
      <title>I've just tried the latest</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124360#M132462</link>
      <description>&lt;P&gt;I've just tried the latest released compiler version&lt;/P&gt;

&lt;P&gt;Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.0.109 Build 20160721&lt;/P&gt;

&lt;P&gt;and I see the problem is stil there. Do you know if a fix is still on the TO-DO list?&lt;/P&gt;

&lt;P&gt;Mick&lt;/P&gt;

&lt;P&gt;(EDIT - I now see that the build date of the compiler I just tried is a few days before your last post, so I shouldn't have expected the fix in this version - sorry)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 08:13:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124360#M132462</guid>
      <dc:creator>Mick_Pont</dc:creator>
      <dc:date>2016-09-12T08:13:00Z</dc:date>
    </item>
    <item>
      <title>I haven't confirmed the fix</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124361#M132463</link>
      <description>&lt;P&gt;I haven't confirmed the fix yet myself; however, according to the updates in the internal tracking record the fix&amp;nbsp;was checked into both the 16.0 and 17.0 branches which means&amp;nbsp;it is&amp;nbsp;anticipated in the next PSXE 2016 Update 4 (tentatively due out in a couple of weeks) and the PSXE 2017 Update 1 in the mid-Q4 timeframe. I'll try confirming the fix in the PSXE 2016 Update 4 package and let you know.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 10:17:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124361#M132463</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2016-09-12T10:17:27Z</dc:date>
    </item>
    <item>
      <title>I've just installed and</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124362#M132464</link>
      <description>&lt;P&gt;I've just installed and tested Version "16.0.4.246 Build 20160811" and confirm that the problem seems to have been resolved - thanks!&lt;/P&gt;

&lt;P&gt;Mick&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 16:09:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124362#M132464</guid>
      <dc:creator>Mick_Pont</dc:creator>
      <dc:date>2016-09-26T16:09:49Z</dc:date>
    </item>
    <item>
      <title>Great, glad to hear it!</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124363#M132465</link>
      <description>&lt;P&gt;Great, glad to hear it!&lt;/P&gt;

&lt;P&gt;Unfortunately my Update 4 installation failed so I'm troubleshooting/repairing&amp;nbsp;that rather than confirming fixes. :-(&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 17:25:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-VS2015-access-violation-in-mixed-language-program-compiled/m-p/1124363#M132465</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2016-09-26T17:25:46Z</dc:date>
    </item>
  </channel>
</rss>

