1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! C1131, C1133 -- check valid and invalid DO loop naming
4 ! C1131 (R1119) If the do-stmt of a do-construct specifies a do-construct-name,
5 ! the corresponding end-do shall be an end-do-stmt specifying the same
6 ! do-construct-name. If the do-stmt of a do-construct does not specify a
7 ! do-construct-name, the corresponding end-do shall not specify a
10 ! C1133 (R1119) If the do-stmt is a label-do-stmt, the corresponding end-do
11 ! shall be identified with the same label.
16 validdo
: do while (.true
.)
19 print *, "Weird to get here"
22 validdo
: do while (.true
.)
26 ! Missing name on initial DO
29 !ERROR: DO construct name unexpected
30 end do formerlabelmissing
32 dolabel
: do while (.true
.)
34 !ERROR: DO construct name mismatch
37 dowithcycle
: do while (.true
.)
39 !ERROR: CYCLE construct-name is not in scope