------- Comment #1 from kargl at gcc dot gnu dot org  2009-11-21 16:26 -------
(In reply to comment #0)

> To illustrate this with a simple example:
> 
> DO I = M1, M2, M3
>    B(I) = A(I)
> ENDDO
> 
> would be most easily, and atraightforwardly, implemented as follows:
> 
>      IF (M3 > 0 .AND. M1 < M2) GOTO 200  ! Loop executed zero times
>      IF (M3 < 0 .AND. M1 > M2) GOTO 200  ! Ditto

First, I just woke up 10 minutes ago and still have 1/2 of cup of coffee,
but the logic above looks wrong.

do i = 1, 2, 1
   print *, i
end do

should produce
1
2

Here, we have m1 = 1, m2 = 2, m3 = 1

>      IF (M3 > 0 .AND. M1 < M2) GOTO 200  ! Loop executed zero times


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42131

Reply via email to