llvm-project/flang/test/Semantics/definable03.f90
Peter Klausler 2725499221 [flang] Check that DO index variables are definable
We're letting immutable objects appear as DO index variables;
catch and diagnose this error.

Differential Revision: https://reviews.llvm.org/D142767
2023-01-29 14:27:26 -08:00

9 lines
215 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
subroutine sub(j)
integer, intent(in) :: j
!ERROR: 'j' may not be used as a DO variable
!BECAUSE: 'j' is an INTENT(IN) dummy argument
do j = 1, 10
end do
end