[flang] Changed the test for unmatched DO loop names to use test_errors.sh

rather than test_any.sh.

Original-commit: flang-compiler/f18@c02aff4570
Reviewed-on: https://github.com/flang-compiler/f18/pull/434
This commit is contained in:
Peter Steinfeld 2019-05-01 12:52:05 -07:00
parent bbc092553c
commit b77f059862
2 changed files with 3 additions and 12 deletions

View file

@ -117,6 +117,7 @@ set(ERROR_TESTS
allocate06.f90
allocate07.f90
allocate08.f90
dosemantics01.f90
)
# These test files have expected symbols in the source

View file

@ -14,20 +14,8 @@
! C1131 -- check valid and invalid DO loop naming
! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: 34:.*name required but missing
! CHECK-NOT: 34:.*DO construct name unexpected
! CHECK-NOT: 32:.*should be
! CHECK-NOT: 32:.*unnamed DO statement
! CHECK: 39:.*name required but missing
! CHECK: 37:.*should be
! CHECK: 44:.*DO construct name unexpected
! CHECK: 42:.*unnamed DO statement
PROGRAM C1131
IMPLICIT NONE
! Test R1121 label-do-stmt
! Valid construct
validDo: DO WHILE (.true.)
PRINT *, "Hello"
@ -36,11 +24,13 @@ PROGRAM C1131
! Missing name on END DO
missingEndDo: DO WHILE (.true.)
PRINT *, "Hello"
!ERROR: DO construct name required but missing
END DO
! Missing name on DO
DO WHILE (.true.)
PRINT *, "Hello"
!ERROR: DO construct name unexpected
END DO missingDO
END PROGRAM C1131