<?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 Array bounds checking for I/O in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759858#M15345</link>
    <description>&lt;P&gt;Array bounds checking for I/O lists has been implemented for a future (2016) major release.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Aug 2015 12:21:27 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2015-08-06T12:21:27Z</dc:date>
    <item>
      <title>Array Bound Checker</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759851#M15338</link>
      <description>Hello,
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Is there a way to give an error message when the code tries and accesses&lt;/DIV&gt;
&lt;DIV&gt;an element of an array that is out of the bounds of the array?&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;So, for example, if length is of size 5, and the code tries to access length(6), an&lt;/DIV&gt;
&lt;DIV&gt;error message would appear at compile time.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Thank you for your time and assistance!&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-size: 17px; border-collapse: collapse; font-family: arial, sans-serif; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;SPAN style="border-collapse: separate; font-family: verdana, sans-serif; font-size: 11px; white-space: normal; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Oct 2009 00:01:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759851#M15338</guid>
      <dc:creator>seniorrojo</dc:creator>
      <dc:date>2009-10-06T00:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Array Bound Checker</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759852#M15339</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;No, not at compile time. The &lt;STRONG&gt;-check bounds&lt;/STRONG&gt; option enables a run-time check for out of bounds references.</description>
      <pubDate>Tue, 06 Oct 2009 08:47:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759852#M15339</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2009-10-06T08:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Array Bound Checker</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759853#M15340</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Actually, -check bounds will also do some compile-time checking for "obvious" cases. For example:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[plain]integer array(5)

array = 0
print *, array(6)
end[/plain]&lt;/PRE&gt;
C:Projects&amp;gt;ifort /check:bounds t.f90&lt;BR /&gt;Intel Visual Fortran Compiler Professional for applications running on IA-32,&lt;BR /&gt; Version 11.1 Build 20090903 Package ID: w_cprof_p_11.1.046&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;t.f90(5): error #5560: Subscript #1 of the array ARRAY has value 6 which is greater than the upper bound of 5&lt;BR /&gt;print *, array(6)&lt;BR /&gt;---------^&lt;BR /&gt;&lt;BR /&gt;(I did this on Windows but it will be the same on Linux.) I will comment that it is rare that the Fortran source will be so blatant about the indexing error as to allow the compiler to catch this at compile time, but it can do so.&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Oct 2009 13:59:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759853#M15340</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-06T13:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Array Bound Checker</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759854#M15341</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Actually, -check bounds will also do some compile-time checking for "obvious" cases. For example:&lt;BR /&gt;&lt;BR /&gt;
&lt;/EM&gt;&lt;PRE&gt;&lt;EM&gt;[plain]integer array(5)

array = 0
print *, array(6)
end[/plain]&lt;/EM&gt;&lt;/PRE&gt;
C:Projects&amp;gt;ifort /check:bounds t.f90&lt;BR /&gt;Intel Visual Fortran Compiler Professional for applications running on IA-32,&lt;BR /&gt; Version 11.1 Build 20090903 Package ID: w_cprof_p_11.1.046&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;t.f90(5): error #5560: Subscript #1 of the array ARRAY has value 6 which is greater than the upper bound of 5&lt;BR /&gt;print *, array(6)&lt;BR /&gt;---------^&lt;BR /&gt;&lt;BR /&gt;(I did this on Windows but it will be the same on Linux.) I will comment that it is rare that the Fortran source will be so blatant about the indexing error as to allow the compiler to catch this at compile time, but it can do so.&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;Hi Kevin and Steve,&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Thank you very much for your help.&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;I used the option and it worked like a charm!&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Thanks again!&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Oct 2009 14:32:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759854#M15341</guid>
      <dc:creator>seniorrojo</dc:creator>
      <dc:date>2009-10-06T14:32:17Z</dc:date>
    </item>
    <item>
      <title>On a side note, 'length' is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759855#M15342</link>
      <description>&lt;P&gt;On a side note, 'length' is not a very good variable name, is it.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2014 23:19:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759855#M15342</guid>
      <dc:creator>Sveta</dc:creator>
      <dc:date>2014-02-25T23:19:33Z</dc:date>
    </item>
    <item>
      <title>Following on the previous</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759856#M15343</link>
      <description>&lt;P&gt;Following on the previous discussion, what I am missing here?&lt;/P&gt;

&lt;P&gt;When I explicitly access elements which are out of the array, I get neither compiler nor run-time errors.&lt;/P&gt;

&lt;P&gt;Notice that I use the -check bounds flag when compiling the program.&lt;/P&gt;

&lt;P&gt;pmginacio@hpc03 ~/.tmp/testbounds&lt;BR /&gt;
	$ ifort --version&lt;BR /&gt;
	ifort (IFORT) 13.1.3 20130607&lt;BR /&gt;
	Copyright (C) 1985-2013 Intel Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;pmginacio@hpc03 ~/.tmp/testbounds&lt;BR /&gt;
	$ cat ./testbounds.f90&lt;BR /&gt;
	! Template program&lt;BR /&gt;
	program testbounds&lt;/P&gt;

&lt;P&gt;implicit none&lt;/P&gt;

&lt;P&gt;!variables declaration&lt;BR /&gt;
	real(8) :: dcm(9)&lt;BR /&gt;
	integer :: i&lt;/P&gt;

&lt;P&gt;! inits&lt;BR /&gt;
	do i=1,size(dcm)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; dcm(i)=i&lt;BR /&gt;
	end do&lt;/P&gt;

&lt;P&gt;print *, dcm(6:14)&lt;/P&gt;

&lt;P&gt;end program testbounds&lt;BR /&gt;
	pmginacio@hpc03 ~/.tmp/testbounds&lt;BR /&gt;
	$ ifort -check bounds -o testbounds testbounds.f90&lt;BR /&gt;
	pmginacio@hpc03 ~/.tmp/testbounds&lt;BR /&gt;
	$ ./testbounds&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 6.00000000000000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.00000000000000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.00000000000000&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 9.00000000000000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.000000000000000E+000&amp;nbsp; 0.000000000000000E+000&lt;BR /&gt;
	&amp;nbsp; 0.000000000000000E+000&amp;nbsp; 2.121995790965272E-314&amp;nbsp; 1.943555437610296E-316&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 14:01:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759856#M15343</guid>
      <dc:creator>Pedro_I_</dc:creator>
      <dc:date>2014-07-31T14:01:45Z</dc:date>
    </item>
    <item>
      <title>It looks as if the array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759857#M15344</link>
      <description>&lt;P&gt;It looks as if the array bounds check doesn't happen when the subscript is part of an I/O list. It really should and I will let the developers know.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 14:26:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759857#M15344</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-07-31T14:26:51Z</dc:date>
    </item>
    <item>
      <title>Array bounds checking for I/O</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759858#M15345</link>
      <description>&lt;P&gt;Array bounds checking for I/O lists has been implemented for a future (2016) major release.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2015 12:21:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Array-Bound-Checker/m-p/759858#M15345</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-08-06T12:21:27Z</dc:date>
    </item>
  </channel>
</rss>

