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