1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! C1131, C1133 -- check valid and invalid DO loop naming
3 ! C1131 (R1119) If the do-stmt of a do-construct specifies a do-construct-name,
4 ! the corresponding end-do shall be an end-do-stmt specifying the same
5 ! do-construct-name. If the do-stmt of a do-construct does not specify a
6 ! do-construct-name, the corresponding end-do shall not specify a
9 ! C1133 (R1119) If the do-stmt is a label-do-stmt, the corresponding end-do
10 ! shall be identified with the same label.
15 validdo
: do while (.true
.)
18 print *, "Weird to get here"
21 validdo
: do while (.true
.)
25 ! Missing name on initial DO
28 !ERROR: DO construct name unexpected
29 end do formerlabelmissing
31 dolabel
: do while (.true
.)
33 !ERROR: DO construct name mismatch
36 dowithcycle
: do while (.true
.)
38 !ERROR: CYCLE construct-name is not in scope