2020-02-26 07:22:14 +08:00
|
|
|
! RUN: %B/test/Semantics/test_errors.sh %s %flang %t
|
2019-05-01 01:06:25 +08:00
|
|
|
! C1131 -- check valid and invalid DO loop naming
|
|
|
|
|
|
|
|
PROGRAM C1131
|
|
|
|
IMPLICIT NONE
|
|
|
|
! Valid construct
|
|
|
|
validDo: DO WHILE (.true.)
|
|
|
|
PRINT *, "Hello"
|
|
|
|
END DO ValidDo
|
|
|
|
|
|
|
|
! Missing name on END DO
|
|
|
|
missingEndDo: DO WHILE (.true.)
|
|
|
|
PRINT *, "Hello"
|
2019-05-02 03:52:05 +08:00
|
|
|
!ERROR: DO construct name required but missing
|
2019-05-01 01:06:25 +08:00
|
|
|
END DO
|
|
|
|
|
|
|
|
! Missing name on DO
|
|
|
|
DO WHILE (.true.)
|
|
|
|
PRINT *, "Hello"
|
2019-05-02 03:52:05 +08:00
|
|
|
!ERROR: DO construct name unexpected
|
2019-05-01 01:06:25 +08:00
|
|
|
END DO missingDO
|
|
|
|
|
|
|
|
END PROGRAM C1131
|