<?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:Wrong overflow warning in parameter statement in ifx and ifort in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-overflow-warning-in-parameter-statement-in-ifx-and-ifort/m-p/1511326#M167548</link>
    <description>&lt;P&gt;Just love your tiny reproducers! &lt;/P&gt;&lt;P&gt;Are these the results you expect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;-2147483648 -2147483648 -2147483647 -2147483647&lt;/P&gt;&lt;P&gt;I compiled and ran with the previous Fortran compilers ifx 2023.1.0 and ifort 2021.9.0 and there is no warning message. &lt;/P&gt;&lt;P&gt;I filed a bug report, CMPLRLLVM-50199, asking if this is a bug or a feature? I'll let you know what I find out.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 04 Aug 2023 20:19:36 GMT</pubDate>
    <dc:creator>Barbara_P_Intel</dc:creator>
    <dc:date>2023-08-04T20:19:36Z</dc:date>
    <item>
      <title>Wrong overflow warning in parameter statement in ifx and ifort</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-overflow-warning-in-parameter-statement-in-ifx-and-ifort/m-p/1511095#M167536</link>
      <description>&lt;P&gt;Both current compilers (classical 2021.10.0 20230609, ifx 2023.2.0 20230721) print an overflow warning for the line, defining parameter b2. Interestingly all numbers are correct and output is as it should be. So no internal overflow actually happened.&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;program smallest_int

implicit none

integer(4), parameter :: a1 = -huge(0_4) - 1_4
integer(4), parameter :: a2 = ibset(0_4, bit_size(0_4)-1_4)

integer(4), parameter :: b1 = a1 + 1_4
integer(4), parameter :: b2 = a2 + 1_4

print *, a1, a2, b1, b2

end program smallest_int&lt;/LI-CODE&gt;&lt;P&gt;As this is from some rather old code, the problem must have been introduced recently.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 05:43:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-overflow-warning-in-parameter-statement-in-ifx-and-ifort/m-p/1511095#M167536</guid>
      <dc:creator>martinmath</dc:creator>
      <dc:date>2023-08-04T05:43:48Z</dc:date>
    </item>
    <item>
      <title>Re:Wrong overflow warning in parameter statement in ifx and ifort</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-overflow-warning-in-parameter-statement-in-ifx-and-ifort/m-p/1511326#M167548</link>
      <description>&lt;P&gt;Just love your tiny reproducers! &lt;/P&gt;&lt;P&gt;Are these the results you expect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;-2147483648 -2147483648 -2147483647 -2147483647&lt;/P&gt;&lt;P&gt;I compiled and ran with the previous Fortran compilers ifx 2023.1.0 and ifort 2021.9.0 and there is no warning message. &lt;/P&gt;&lt;P&gt;I filed a bug report, CMPLRLLVM-50199, asking if this is a bug or a feature? I'll let you know what I find out.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Aug 2023 20:19:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-overflow-warning-in-parameter-statement-in-ifx-and-ifort/m-p/1511326#M167548</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-08-04T20:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Wrong overflow warning in parameter statement in ifx and ifort</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-overflow-warning-in-parameter-statement-in-ifx-and-ifort/m-p/1511601#M167562</link>
      <description>&lt;P&gt;Thanks. Yes, these are the number to expect in 32 bit signed integer model (-2^31 and -2^31+1). As a1 and a2 are equal, it is surprising to see only a warning for b2. I can still see this, if a1 and a2 are defined elsewhere. So I guess, these values are stored internally as 64bit. Then bit pattern of a1 is different than a2, and in particular a1 is a positive number not fitting into 32 bit signed integer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 04:58:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-overflow-warning-in-parameter-statement-in-ifx-and-ifort/m-p/1511601#M167562</guid>
      <dc:creator>martinmath</dc:creator>
      <dc:date>2023-08-07T04:58:51Z</dc:date>
    </item>
    <item>
      <title>Re:Wrong overflow warning in parameter statement in ifx and ifort</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-overflow-warning-in-parameter-statement-in-ifx-and-ifort/m-p/1546102#M169295</link>
      <description>&lt;P&gt;This erroneous error message is gone with ifx and ifort in the latest release 2024.0. It was released earlier this week. Please give it a try!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Nov 2023 16:08:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Wrong-overflow-warning-in-parameter-statement-in-ifx-and-ifort/m-p/1546102#M169295</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-11-21T16:08:41Z</dc:date>
    </item>
  </channel>
</rss>

