[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / dosemantics01.f90
blobec5375ff549b0910f3c0c89ceb706d7c38313b0b
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! C1131 -- check valid and invalid DO loop naming
5 PROGRAM C1131
6 IMPLICIT NONE
7 ! Valid construct
8 validDo: DO WHILE (.true.)
9 PRINT *, "Hello"
10 END DO ValidDo
12 ! Missing name on END DO
13 missingEndDo: DO WHILE (.true.)
14 PRINT *, "Hello"
15 !ERROR: DO construct name required but missing
16 END DO
18 ! Missing name on DO
19 DO WHILE (.true.)
20 PRINT *, "Hello"
21 !ERROR: DO construct name unexpected
22 END DO missingDO
24 END PROGRAM C1131