[flang] Port test_any.sh tests to FileCheck: Hand port tests which use regexes

The regex syntax used by test_any.sh's FileCheck is sometimes incompatible with
real FileCheck.

Hand port these tests to use FileCheck and it's regex format.

Also remove FIXME from label01 that no longer applies.
Also add second run-line that enables all tests.
Add some new FIXMEs for issues in original tests

Differential Revision: https://reviews.llvm.org/D82164
This commit is contained in:
Richard Barton 2020-06-05 19:09:12 +01:00
parent 2e17bba324
commit 9c98ed9cd4
3 changed files with 14 additions and 14 deletions

View file

@ -1,7 +1,6 @@
! RUN: %S/test_any.sh %s %t %f18
! C1122 The index-name shall be a named scalar variable of type integer.
! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: Must have INTEGER type, but is REAL\\(4\\)
! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: Must have INTEGER type, but is REAL(4)
subroutine do_concurrent_test1(n)
implicit none

View file

@ -1,9 +1,7 @@
! RUN: %S/test_any.sh %s %t %f18
! EXEC: ${F18} -funparse-with-symbols %s -o /dev/null 2>&1 | grep -v 'procedure conflicts' | ${FileCheck} %s
! CHECK-NOT: error:[[:space:]]
! FIXME: filter out the array/function syntax issues (procedure conflicts)
! for now...
! RUN: %f18 -funparse-with-symbols -DSTRICT_F18 -Mstandard %s 2>&1 | FileCheck %s
! RUN: %f18 -funparse-with-symbols -DARCHAIC_FORTRAN %s 2>&1 | FileCheck %s
! CHECK-NOT: error:{{[[:space:]]}}
! FIXME: the above check line does not work because diags are not emitted with error: in them.
! these are the conformance tests
! define STRICT_F18 to eliminate tests of features not in F18
@ -83,6 +81,7 @@ subroutine do_loop07(a,n)
end do loopone
end subroutine do_loop07
#ifndef STRICT_F18
subroutine do_loop08(a,b,n,m,nn)
integer :: n, m, nn
real, dimension(n,n) :: a
@ -114,6 +113,7 @@ subroutine do_loop08(a,b,n,m,nn)
end do loopone
111 print *, "done"
end subroutine do_loop08
#endif
#ifndef STRICT_F18
! extended ranges supported by PGI, gfortran gives warnings
@ -123,7 +123,7 @@ subroutine do_loop09(a,n,j)
goto 400
200 print *, "found the index", j
print *, "value at", j, "is", a(j)
goto 300
goto 300 ! FIXME: emits diagnostic even without -Mstandard
400 do 100 i = 1, n
if (i .eq. j) then
goto 200 ! extension: extended GOTO ranges
@ -168,7 +168,7 @@ subroutine arith_if12(i)
end subroutine arith_if12
#endif
#if 0
#ifndef STRICT_F18
subroutine alt_return_spec13(i,*,*,*)
9 continue
8 labelme: if (i .lt. 42) then
@ -192,6 +192,7 @@ subroutine alt_return_spec14(i)
end subroutine alt_return_spec14
#endif
#ifndef STRICT_F18
subroutine specifiers15(a,b,x)
integer x
OPEN (10, file="myfile.dat", err=100)
@ -212,6 +213,7 @@ subroutine specifiers15(a,b,x)
50 WRITE (11,30,err=100) b
CLOSE (11)
end subroutine specifiers15
#endif
#if !defined(STRICT_F18) && defined(ARCHAIC_FORTRAN)
! assigned goto was deleted in F95. PGI supports, gfortran gives warnings

View file

@ -1,12 +1,11 @@
! RUN: %S/test_any.sh %s %t %f18
! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! RUN: not %f18 -funparse-with-symbols %s 2>&1 | FileCheck %s
! CHECK: BLOCK DATA subprogram name mismatch
! CHECK: should be
! CHECK: FUNCTION name mismatch
! CHECK: SUBROUTINE name mismatch
! CHECK: PROGRAM name mismatch
! CHECK: SUBMODULE name mismatch
! CHECK: INTERFACE generic-name .t7. mismatch
! CHECK: INTERFACE generic-name (t7) mismatch
! CHECK: mismatched INTERFACE
! CHECK: derived type definition name mismatch
! CHECK: MODULE PROCEDURE name mismatch