summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/do_iterator.f90
blob: cb3e50d59bccdc545731e96e1536af44800fb438 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
! { dg-do compile }
! various checks which verify that we don't change do-iterators
DO I=1,5       ! { dg-error "cannot be redefined" "changing do-iterator 1" }
   I=1         ! { dg-error "cannot be redefined" "changing do-iterator 1" }
END DO
DO I=1,5       ! { dg-error "cannot be redefined" "changing do-iterator 2" }
   READ(5,*) I ! { dg-error "cannot be redefined" "changing do-iterator 2" }
END DO
DO I=1,5       ! { dg-error "cannot be redefined" "changing do-iterator 3" }
   READ(5,*,iostat=i) j ! { dg-error "cannot be redefined" "changing do-iterator 3" }
ENDDO
END
! { dg-error "Invalid character" "character" { target *-*-* } 7 }