<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Wed, 25 Nov 2009 17:14:57 -0800 -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="http://software.intel.com/en-us/articles/intel-compilers/type/software-defects/feed/" rel="self" type="application/rss+xml" />
    <title>Intel Software Network articles feed</title>
    <link>http://software.intel.com/en-us/articles/intel-compilers/software-defects/</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Unresolved External Symbol Error at Link Phase when Enabled &amp;#34;/Qlong_double&amp;#34;</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><b>Reference Number : DPD200084693</b><br /><br /><br /><b>Version : 11.1.038 </b><br /><br /><br /><b>Operating System : Windows</b><br /><br /><br /><b>Problem Description : </b><br /><br />Following case will get unresolved external symbol error at linking stage if use c++ stream to pass numerical variables with option /Qlong_double specified.<br /><br />Case: test006.cpp<br />
<pre name="code" class="cpp">#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
using namespace std;
int main()
{
            int x=0;          //line 6
            cout &lt;&lt; x;      //line 7
}
</pre>
<p><br />Command:</p>
<blockquote>
<p>icl /Od /Ob1 /Qlong_double /MDd test006.cpp </p>
</blockquote>
<p><br />Fail Output:</p>
<blockquote>
<p> -out:test006.exe<br />test006.obj<br />test006.obj : error LNK2001: unresolved external symbol "protected: virtual class std::ostreambuf_iterator&lt;char,struct std::char_traits&lt;char&gt; &gt; __thiscall std::num_put&lt;char,class std::ostreambuf_iterator&lt;char,struct std::char_traits&lt;char&gt; &gt; &gt;::do_put(class std::ostreambuf_iterator&lt;char,struct std::char_traits&lt;char&gt; &gt;,class std::ios_base &amp;,char,UNKNOWN)const " (?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_T@Z)<br />test006.exe : fatal error LNK1120: 1 unresolved externals</p>
</blockquote>
<p> </p>
<p>While if changing line 6 &amp; 7 to following,  the test will link fine: </p>
<pre name="code" class="cpp">char x='0';          //line 6
cout &lt;&lt; x;          //line 7</pre>
<p><br />Currently only using the option combination like "/Ob{1|2} /Qlong_double /MD[d]" and the use of C++ stream to pass numerical variable will trigger this link failure.  </p>
<p><b><br />Resolution Status : </b><br />This is a regression from C++ Compiler 11.0 regarding a new feature on 11.1:<br />"The post-11.0 handling of dllimport and inline, decides not to emit the funciton definition in this case, because it is expected to be supplied from the DLL. You can get the 11.0 and before behavior back by using /mGLOB_cg_lower_dllimport=F."<br /><br />Other possible work-arounds are:<br />1. Use /Ob0 while using /Qlong_double.<br />2. Avoid the use of C++ stream to pass numerical variables. In this case use printf instead.<br /><br /><br /><br /><i>[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]</i></p>
</div> ]]></description>
      <link>http://software.intel.com/en-us/articles/unresolved-external-symbol-error-at-link-phase-when-enabled-qlong_double</link>
      <pubDate>Wed, 19 Aug 2009 02:19:50 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/unresolved-external-symbol-error-at-link-phase-when-enabled-qlong_double#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/unresolved-external-symbol-error-at-link-phase-when-enabled-qlong_double</guid>
      <category>Intel® Compilers</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
    <item>
      <title>compiler internal error 0_1279</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><b>Reference Number : DPD200008448, DPD200137998</b><br /><br /><br /><b>Version : All the 10.x, 11.x compilers and the older versions.</b><br /><br /><br /><b>Operating System : Linux, Windows</b><br /><br /><br /><b>Problem Description : </b><br />    Test case 1: test.c<br />             int round(float in);<br />             int foo(float in)<br />             {<br />                  int res=round(in);<br />                  if(res !=0) res = 1;<br />                   return res;<br />              }<br /><br />        Test case 2: test.c<br />              float memcpy(char*, char*, int);<br />              float res;<br />              void foo(char* in, char* out)<br />              {<br />                   res = memcpy(in, out, 100);<br />              }<br />     Test case 3: test.c<br />             double pow();<br />             void bar(double);<br />             void foo()<br />             {<br />                  int a=0;<br />                  int b[1]={255};<br />                  bar(pow(b[a],2));<br />             }<br />     compile the test case: icl test.c -c<br />The compiler will report the internal error 0_0, or the internal error 0_1279, or the internal error 0_1208 etc in difference cases.<br />This is the problem in all the cases where the compiler recognize something (defined by user differently than in compiler intrinsics table) being an intrinsic call and expand this call inline.<br /><b>Resolution Status : </b><br />1. Change the function name to your own name different to the compiler intrinsic function. For example, change 'round' in case 1 to 'myround', change 'memcpy' in case 2 to 'mymemcpy', change 'pow' in case 3 to 'mypow'.<br />2. Include the compiler head files to use the intrinsic functions provided by compiler instead of to define your own. Be carefull to the compiler warnings for incompatible declarations during compilation stage.<br /><br /><br /><br /><i>[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]</i></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/compiler-internal-error-0_1279</link>
      <pubDate>Mon, 20 Jul 2009 19:50:24 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/compiler-internal-error-0_1279#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/compiler-internal-error-0_1279</guid>
      <category>Intel® Parallel Composer</category>
      <category>Intel® Compilers</category>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
    </item>
  </channel></rss>