[flang] Port all remaining regression tests to lit

We have re-classified a subset of the regression tests as unit tests and
now we are porting the remaining ones.

Test discovery and running is now performed by lit rather than ctest.
The tests continue to use their original scripts with minor
modifications. Most of the changes were mechanical and so scripted.
A few changes were made by hand. Details

Manual:
  * modfile09-*.f90 tests depend on being run together as some tests have
    dependencies on modules created by other tests. This will need
     separating out when porting away from test_modfile.sh, but for now,
     added modfile09-*.f90 to the Inputs directory and added a single
     tests modfile09.f90 to hold the run line.
  * getdefinition03-a.f90 includes a non-test file getdefinition03-b.f90.
    Manually edited the former to find the latter in Inputs so as to add
    only one test.
  * Same pattern for getsymbols03-{a,b}.f90

Auto:
  * Remaining tests have a lit RUN line added to them based on the type
    of test they are.
  * Failing tests also have an XFAIL line added to them.
  * Generic tests have their pre-existing RUN lines replaced with the
    word "EXEC" to avoid conflict with the added lit RUN line.

Original-commit: flang-compiler/f18@63ec0af9f4
Reviewed-on: https://github.com/flang-compiler/f18/pull/1027
Tree-same-pre-rewrite: false
This commit is contained in:
Luke Ireland 2020-02-14 14:02:29 +00:00
parent ee5fa1f233
commit f1a8eae3b6
342 changed files with 388 additions and 74 deletions

View File

@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test intrinsic operation folding

View File

@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Check intrinsic function folding with host runtime library
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test operation folding edge case (both expected value and messages)
! These tests make assumptions regarding real(4) and integer(4) extrema.

View File

@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test intrinsic function folding edge case (both expected value and messages)
! These tests make assumptions regarding real(4) extrema.

Binary file not shown.

View File

@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test transformational intrinsic function folding
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test numeric model inquiry intrinsics
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test folding of LBOUND and UBOUND
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test folding of IS_CONTIGUOUS on simply contiguous items (9.5.4)
! When IS_CONTIGUOUS() is constant, it's .TRUE.

View File

@ -1,4 +1,4 @@
! RUN: ${F18} -fparse-only %s
! EXEC: ${F18} -fparse-only %s
module mm2a
implicit none

View File

@ -1,4 +1,4 @@
! RUN: ${F18} -fparse-only %s
! EXEC: ${F18} -fparse-only %s
module mm2b
use mm2a

View File

@ -7,6 +7,6 @@ PROGRAM helloworld
i = callget5()
ENDPROGRAM
! RUN: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -fget-symbols-sources -fparse-only %s 2>&1 | ${FileCheck} %s
! CHECK:callget5: mm2b
! CHECK:get5: mm2a

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
! Creating a symbol that allocate should accept

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C933_a(b1, ca3, ca4, cp3, cp3mold, cp4, cp7, cp8, bsrc)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C936(param_ca_4_assumed, param_ta_4_assumed, param_ca_4_deferred)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C945_a(srca, srcb, srcc, src_complex, src_logical, &

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C946(param_ca_4_assumed, param_ta_4_assumed, param_ca_4_deferred)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
!TODO: mixing expr and source-expr?

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
! TODO: Function Pointer in allocate and derived types!

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
subroutine C941_C942b_C950(xsrc, x1, a2, b2, cx1, ca2, cb1, cb2, c1)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for semantic errors in ALLOCATE statements
module not_iso_fortran_env

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check calls with alt returns
CALL TEST (N, *100, *200 )

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check subroutine with alt return
SUBROUTINE TEST (N, *, *)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check for various alt return error conditions
SUBROUTINE TEST (N, *, *)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Functions cannot use alt return
REAL FUNCTION altreturn01(X)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test extension: RETURN from main program
return !ok

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! 10.2.3.1(2) All masks and LHS of assignments in a WHERE must conform
subroutine s1

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Pointer assignment constraints 10.2.2.2
module m1

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Pointer assignment constraints 10.2.2.2 (see also assign02.f90)
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! 9.4.5
subroutine s1
type :: t(k, l)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Forward references to derived types (error cases)
!ERROR: The derived type 'undef' was forward-referenced but not defined

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Confirm enforcement of constraints and restrictions in 7.5.7.3
! and C779-C785.

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test BLOCK DATA subprogram (14.3)
block data foo
!ERROR: IMPORT is not allowed in a BLOCK DATA subprogram

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! C1107 -- COMMON, EQUIVALENCE, INTENT, NAMELIST, OPTIONAL, VALUE or
! STATEMENT FUNCTIONS not allow in specification part

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! C1108 -- Save statement in a BLOCK construct shall not conatin a
! saved-entity-list that does not specify a common-block-name

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Tests implemented for this standard:
! Block Construct
! C1109

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Enforce 18.2.3.3
program test

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Confirm enforcement of constraints and restrictions in 15.6.2.1
non_recursive function f01(n) result(res)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! 15.5.1 procedure reference constraints and restrictions
subroutine s01(elem, subr)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.4 constraints and restrictions for non-POINTER non-ALLOCATABLE
! dummy arguments.

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 8.5.10 & 8.5.18 constraints on dummy argument declarations
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.5 constraints and restrictions for POINTER & ALLOCATABLE
! arguments when both sides of the call have the same attributes.

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.6 constraints and restrictions for ALLOCATABLE
! dummy arguments.

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.7 constraints and restrictions for POINTER dummy arguments.
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.8 coarray dummy arguments
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.5.2.9(2,3,5) dummy procedure requirements
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.7 (C1583-C1590, C1592-C1599) constraints and restrictions
! for pure procedures.
! (C1591 is tested in call11.f90; C1594 in call12.f90.)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.7 C1591 & others: contexts requiring pure subprograms
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.7 C1594 - prohibited assignments in pure subprograms
module used

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 15.4.2.2 constraints and restrictions for calls to implicit
! interfaces

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test 8.5.18 constraints on the VALUE attribute
module m

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! C711 An assumed-type actual argument that corresponds to an assumed-rank
! dummy argument shall be assumed-shape or assumed-rank.
subroutine s(arg1, arg2, arg3)

View File

@ -1,6 +1,7 @@
! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: end do
SUBROUTINE sub00(a,b,n,m)

View File

@ -1,6 +1,7 @@
! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: end do
SUBROUTINE sub00(a,b,n,m)

View File

@ -1,6 +1,7 @@
! RUN: %S/test_any.sh %s %flang %t
! negative test -- invalid labels, out of range
! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK: 10 continue
! CHECK: end do

View File

@ -1,4 +1,5 @@
! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! RUN: %S/test_any.sh %s %flang %t
! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: do [1-9]
! Figure out how to also execute this test.

View File

@ -1,5 +1,6 @@
! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! XXXRUN: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! RUN: %S/test_any.sh %s %flang %t
! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! XXXEXEC: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: do *[1-9]
program P

View File

@ -1,4 +1,5 @@
! RUN: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! RUN: %S/test_any.sh %s %flang %t
! EXEC: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: do *[1-9]
! CHECK: omp simd

View File

@ -1,7 +1,8 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1131
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: A DO loop should terminate with an END DO or CONTINUE
program endDo

View File

@ -1,3 +1,4 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
@ -5,7 +6,7 @@
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,3 +1,4 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
@ -5,7 +6,7 @@
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,3 +1,4 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
@ -5,7 +6,7 @@
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,3 +1,4 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
@ -5,7 +6,7 @@
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,10 +1,11 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,10 +1,11 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,10 +1,11 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,10 +1,11 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,10 +1,11 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard -I../../tools/f18/include %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard -I../../tools/f18/include %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,10 +1,11 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,10 +1,11 @@
! RUN: %S/test_any.sh %s %flang %t
! Error test -- DO loop uses obsolete loop termination statement
! See R1131 and C1133
! By default, this is not an error and label do are rewritten to non-label do.
! A warning is generated with -Mstandard
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do

View File

@ -1,7 +1,8 @@
! RUN: %S/test_any.sh %s %flang %t
! Check that if there is a label or a name on an label-do-stmt,
! then it is not lost when rewriting it to an non-label-do-stmt.
! RUN: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! EXEC: ${F18} -funparse-with-symbols -Mstandard %s 2>&1 | ${FileCheck} %s
! CHECK: end do
! CHECK: 2 do

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Test selector and team-value in CHANGE TEAM statement
! OK

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! C718 Each named constant in a complex literal constant shall be of type
! integer or real.
subroutine s()

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check that a basic computed goto compiles
INTEGER, DIMENSION (2) :: B

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check that computed goto express must be a scalar integer expression
! TODO: PGI, for example, accepts a float & converts the value to int.

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
!C1117
subroutine test1(a, i)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
!C1118
subroutine test1

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
!C1119
subroutine test1(a, i)

View File

@ -1,4 +1,5 @@
! RUN: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! RUN: %S/test_any.sh %s %flang %t
! EXEC: ${F18} -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: Control flow escapes from CRITICAL
subroutine test1(a, i)

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
!Test for checking data constraints, C882-C887
module m1
type person

View File

@ -1,3 +1,4 @@
! RUN: %S/test_errors.sh %s %flang %t
! Check that expressions are analyzed in data statements
subroutine s1

Some files were not shown because too many files have changed in this diff Show More