Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / dosemantics10.f90
blob0aad3c5320a5874997d6e40522c161e13fefc707
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! C1134 A CYCLE statement must be within a DO construct
4 ! C1166 An EXIT statement must be within a DO construct
6 subroutine s1()
7 ! this one's OK
8 do i = 1,10
9 cycle
10 end do
12 ! this one's OK
13 do i = 1,10
14 exit
15 end do
17 ! all of these are OK
18 outer: do i = 1,10
19 cycle
20 inner: do j = 1,10
21 cycle
22 end do inner
23 cycle
24 end do outer
26 !ERROR: No matching DO construct for CYCLE statement
27 cycle
29 !ERROR: No matching construct for EXIT statement
30 exit
32 !ERROR: No matching DO construct for CYCLE statement
33 if(.true.) cycle
35 !ERROR: No matching construct for EXIT statement
36 if(.true.) exit
38 end subroutine s1