aboutsummaryrefslogtreecommitdiff
path: root/flang/test/Semantics/expr-errors03.f90
blob: 4a08c06ac9d637c49065e31a9fab3260649186cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! RUN: %python %S/test_errors.py %s %flang_fc1
! Regression test for subscript error recovery
module m
  implicit none
  integer, parameter :: n = 3
  integer, parameter :: pc(n) = [0, 5, 6]
 contains
  logical function f(u)
    integer :: u
    !ERROR: No explicit type declared for 'i'
    do i = 1, n
      !ERROR: No explicit type declared for 'i'
      if (pc(i) == u) then
        f = .true.
        return
      end if
    end do
    f = .false.
  end
end module