<?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 Quote:Steve Lionel (Intel) in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088996#M123701</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;SPAN style="font-size: 1em;"&gt;consider &amp;nbsp;CYCLE with a labeled loop.&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Well you learn something new every, I didn't know CYCLE (and more usefully EXIT) can use a loop label to trip out of more than one level of loop nesting! Cheers!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2016 16:08:18 GMT</pubDate>
    <dc:creator>andrew_4619</dc:creator>
    <dc:date>2016-11-17T16:08:18Z</dc:date>
    <item>
      <title>faulty compiler error #6526</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088992#M123697</link>
      <description>&lt;P&gt;This is a simplied version of something I submitted earlier.&lt;/P&gt;

&lt;P&gt;program Console11&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer i1,i2,i3,i4,j&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; do 10 i1=1,10 &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; do 10 i2=1,10&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(i2==i1)go to 10&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 20 i3=1,10&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(i3.eq.i2 .or. i3.eq. i1) go to 20&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 20 i4=1,10&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(i4.eq.i3.or. i4.eq.i2 .or. i4 .eq.i1)go to 20&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; j=i1+i2+i3+i4&lt;/P&gt;

&lt;P&gt;20 enddo&lt;BR /&gt;
	10 enddo&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end program&lt;/P&gt;

&lt;P&gt;This wont compile, unless I add another enddo line, i.e.&lt;/P&gt;

&lt;P&gt;that I use Do 30, I4=1,10&lt;/P&gt;

&lt;P&gt;I think the presence ot the IF statements causes the problem.&lt;/P&gt;

&lt;P&gt;I want to get Unique values of i1,i2,i3, and i4&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 00:01:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088992#M123697</guid>
      <dc:creator>WSinc</dc:creator>
      <dc:date>2016-11-17T00:01:16Z</dc:date>
    </item>
    <item>
      <title>Your program is faulty, not</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088993#M123698</link>
      <description>&lt;P&gt;Your program is faulty, not the compiler. The compiler's error message is exactly on target, though it's highlighting the wrong line&lt;/P&gt;

&lt;P&gt;t.f90(7): error #6526: A branch to a do-term-shared-stmt has occurred from outside the range of the corresponding inner-shared-do-construct. &amp;nbsp; [20]&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 20 i4=1,10&lt;BR /&gt;
	-------------^&lt;/P&gt;

&lt;P&gt;When you have shared DO termination (an obsolescent feature), the termination belongs to the innermost loop. The line:&lt;/P&gt;

&lt;P&gt;if(i3.eq.i2 .or. i3.eq. i1) go to 20&lt;/P&gt;

&lt;P&gt;is part of the outermost loop and therefore a branch into the inner loop is not allowed.&lt;/P&gt;

&lt;P&gt;Don't use shared DO termination. Instead of GOTO, consider &amp;nbsp;CYCLE with a labeled loop.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 00:20:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088993#M123698</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-11-17T00:20:00Z</dc:date>
    </item>
    <item>
      <title>Quote:billsincl wrote: I want</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088994#M123699</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;billsincl wrote:&lt;BR /&gt; I want to get unique values of i1,i2,i3, and i4 &lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Your specification is incomplete. Do you want just one quartet of distinct integers between 1 and 10? Or do you want to list all such quartets? If the latter, here is code that does it without using labels (caution: there are thousands of -- 10*9*8*7, to be precise -- lines printed out!).&lt;/P&gt;

&lt;P&gt;If you wish to rule out permutations, you need to modify the code.&lt;/P&gt;

&lt;P&gt;The obvious solution, [1, 2, 3, 4] has the virtue that the items add up to 10, the upper bound of the range of values permitted.&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;program quartet
implicit none
integer :: i1,i2,i3,i4
logical :: used(10) = .false.

do i1 = 1, 10
   used(i1) = .true.
   do i2=1,10
      if (used(i2)) cycle
      used(i2) = .true.
      do i3 = 1, 10
         if (used(i3)) cycle
         used(i3) = .true.
         do i4 = 1, 10
            if (used(i4)) cycle
            write(*,'(4I4)')i1,i2,i3,i4
         end do
         used(i3) = .false.
      end do
      used(i2) = .false.
    end do
    used(i1) = .false.
end do
end program&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 01:20:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088994#M123699</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-11-17T01:20:00Z</dc:date>
    </item>
    <item>
      <title>program Console11</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088995#M123700</link>
      <description>&lt;PRE class="brush:fortran;"&gt;program Console11
&amp;nbsp;integer i1,i2,i3,i4,j
&amp;nbsp;do i1=1,10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; do i2=1,10
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(i2==i1) cycle
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i3=1,10
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(i3.eq.i2 .or. i3.eq. i1) cycle
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i4=1,10
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(i4.eq.i3.or. i4.eq.i2 .or. i4 .eq.i1) cycle
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; j=i1+i2+i3+i4
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(*,'(4I4)')i1,i2,i3,i4
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enddo ! i4
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enddo ! i3
&amp;nbsp;&amp;nbsp; enddo ! i2
&amp;nbsp;enddo ! i1
end program
&lt;/PRE&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 13:32:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088995#M123700</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-11-17T13:32:48Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088996#M123701</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;SPAN style="font-size: 1em;"&gt;consider &amp;nbsp;CYCLE with a labeled loop.&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Well you learn something new every, I didn't know CYCLE (and more usefully EXIT) can use a loop label to trip out of more than one level of loop nesting! Cheers!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 16:08:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/faulty-compiler-error-6526/m-p/1088996#M123701</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2016-11-17T16:08:18Z</dc:date>
    </item>
  </channel>
</rss>

