<?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 I think we need to see a in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Mixed-kind-integer-overflow/m-p/1175219#M147221</link>
    <description>&lt;P&gt;I think we need to see a minimal but complete source that reproduces the problem.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Apr 2018 22:03:17 GMT</pubDate>
    <dc:creator>Steve_Lionel</dc:creator>
    <dc:date>2018-04-26T22:03:17Z</dc:date>
    <item>
      <title>Mixed kind integer overflow</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Mixed-kind-integer-overflow/m-p/1175218#M147220</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;For ifort 18.0.2 I get the following messages in attempting to compile one of my codes:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;ifort -c sbox_hashes.f90&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;sbox_hashes.f90(321): error #6384: The INTEGER(KIND=4) value is out-of-range.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] - 2_int64**32, kind=int64 ), int( &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;-------------------------^&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;sbox_hashes.f90(450): error #6384: The INTEGER(KIND=4) value is out-of-range.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ], kind=int64 ) &amp;gt;= 2_int64**31 ), kind=int32 )&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;----------------------------------------^&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;sbox_hashes.f90(63): error #7747: Invalid parameter expression. &amp;nbsp; [INT]&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mulvey_maps(0:255) = int( merge( int( &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;-----------------------------^&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;compilation aborted for sbox_hashes.f90 (code 1)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(0, 0, 0);"&gt;&amp;nbsp;&lt;/P&gt;

&lt;DIV&gt;&amp;nbsp;I suspect the third message is caused by the other two. I had expected that in mixing integer kind values in an expression the result would have the kind value with the largest number of digits. In that case the indicated expression should result in an in range value. Am I mistaken about the effect of mixing kind values?&lt;/DIV&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 18:56:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Mixed-kind-integer-overflow/m-p/1175218#M147220</guid>
      <dc:creator>clodius__william</dc:creator>
      <dc:date>2018-04-26T18:56:01Z</dc:date>
    </item>
    <item>
      <title>I think we need to see a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Mixed-kind-integer-overflow/m-p/1175219#M147221</link>
      <description>&lt;P&gt;I think we need to see a minimal but complete source that reproduces the problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 22:03:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Mixed-kind-integer-overflow/m-p/1175219#M147221</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2018-04-26T22:03:17Z</dc:date>
    </item>
    <item>
      <title>Below is a simplified version</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Mixed-kind-integer-overflow/m-p/1175220#M147222</link>
      <description>&lt;P&gt;Below is a simplified version of the code. Note the original version had what I believe was the opposite comparison from what I need to avoid over flows. The idea was to map in a standard conforming way integers sampled from 0 to 2**32-1, to -2**31 to 2**31-1 using the usual interpretation of the two's complement sign bit. The calculations are initially performed in 64 bits. There are nominally three arrays i n the merge, the array of the original samples, the original samples -2**32, and a logical array that is true if the elements of the first array is less than 2**31. The result of the merge should be 64 bit integers between -2**31 and 2**31-1, that the INT then maps to 32 bit integers. The original code hand arrays of 256 elements not 8, and several procedures that used the final array. Note also that errors seem to be raised at the same locations in the code, regardless of the form of the comparison used in the merge, and whether the factors are computed in place or assigned to a parameter that is used in place.&lt;/P&gt;

&lt;P&gt;module simplified_mulvey&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; use, intrinsic:: iso_fortran_env, only: &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int8, int16, int32, int64&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; implicit none&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; integer(int64), parameter:: two_31 = 2_int64**31, two_32 = 2_int64**32&lt;/P&gt;

&lt;P&gt;! Ramdom integers used by Bret Mulvey in his substitution box (S-Box) hash. &amp;nbsp;As&lt;BR /&gt;
	! the integer can exceed 2**31 and gfortran objects to transforming the values&lt;BR /&gt;
	! to a 32 bit integer, use value if &amp;lt; 2**31, else use value - 2**32.&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer(int32), parameter :: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mulvey_maps(0:7) = int( merge( int( &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ int(z'F53E1837',int64), int(z'5F14C86B',int64), &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int(z'9EE3964C',int64), int(z'FA796D53',int64), &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int(z'32223FC3',int64), int(z'4D82BC98',int64), &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int(z'A0C7FA62',int64), int(z'63E2C982',int64) &amp;nbsp;&amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ], kind=int64 ), int( &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ int(z'F53E1837',int64), int(z'5F14C86B',int64), &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int(z'9EE3964C',int64), int(z'FA796D53',int64), &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int(z'32223FC3',int64), int(z'4D82BC98',int64), &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int(z'A0C7FA62',int64), int(z'63E2C982',int64) &amp;nbsp;&amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ] - 2_int64**32, kind=int64 ), int( &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ int(z'F53E1837',int64), int(z'5F14C86B',int64), &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int(z'9EE3964C',int64), int(z'FA796D53',int64), &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int(z'32223FC3',int64), int(z'4D82BC98',int64), &amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int(z'A0C7FA62',int64), int(z'63E2C982',int64) &amp;nbsp;&amp;amp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ], kind=int64 ) &amp;lt; 2_int64**31 ), kind=int32 )&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	end module simplified_mulvey&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 22:46:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Mixed-kind-integer-overflow/m-p/1175220#M147222</guid>
      <dc:creator>clodius__william</dc:creator>
      <dc:date>2018-04-27T22:46:12Z</dc:date>
    </item>
    <item>
      <title>I stared at this a while, and</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Mixed-kind-integer-overflow/m-p/1175221#M147223</link>
      <description>&lt;P&gt;I stared at this a while, and made some tweaks for testing. What I end up with is a belief that you have found one or more compiler bugs. Please report them to the Intel online service center. As best as I can tell, this should compile without errors, but I don't discount the possibility I overlooked something.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 23:32:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Mixed-kind-integer-overflow/m-p/1175221#M147223</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2018-04-27T23:32:17Z</dc:date>
    </item>
  </channel>
</rss>

