Skip to content

Commit

Permalink
Added auto ported tests with manual exceptions:
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LukeIreland1 committed Mar 6, 2020
1 parent b9667dc commit c22ce5e
Show file tree
Hide file tree
Showing 413 changed files with 464 additions and 74 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions test/Evaluate/folding01.f90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t

! Test intrinsic operation folding

Expand Down
1 change: 1 addition & 0 deletions test/Evaluate/folding02.f90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Check intrinsic function folding with host runtime library

module m
Expand Down
1 change: 1 addition & 0 deletions test/Evaluate/folding03.f90
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
1 change: 1 addition & 0 deletions test/Evaluate/folding04.f90
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
Binary file modified test/Evaluate/folding05.f90
Binary file not shown.
1 change: 1 addition & 0 deletions test/Evaluate/folding06.f90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test transformational intrinsic function folding

module m
Expand Down
1 change: 1 addition & 0 deletions test/Evaluate/folding07.f90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test numeric model inquiry intrinsics

module m
Expand Down
1 change: 1 addition & 0 deletions test/Evaluate/folding08.f90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %S/test_folding.sh %s %flang %t
! Test folding of LBOUND and UBOUND

module m
Expand Down
1 change: 1 addition & 0 deletions test/Evaluate/folding09.f90
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions test/Preprocessing/pp001.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* keyword macros
integer, parameter :: KWM = 666
#define KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp002.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* #undef
integer, parameter :: KWM = 777
#define KWM 666
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp003.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* function-like macros
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp004.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KWMs case-sensitive
integer, parameter :: KWM = 777
#define KWM 666
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp005.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KWM split across continuation, implicit padding
integer, parameter :: KWM = 666
#define KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp006.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* ditto, but with intervening *comment line
integer, parameter :: KWM = 666
#define KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp007.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KWM split across continuation, clipped after column 72
integer, parameter :: KWM = 666
#define KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp008.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KWM with spaces in name at invocation NOT replaced
integer, parameter :: KWM = 777
#define KWM 666
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp009.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM call split across continuation, implicit padding
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp010.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* ditto, but with intervening *comment line
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp011.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM call name split across continuation, clipped
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp012.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM call name split across continuation
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp013.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM call split between name and (
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp014.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM call split between name and (, with intervening *comment
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp015.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM call split between name and (, clipped
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp016.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM call split between name and ( and in argument
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp017.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KLM rescan
integer, parameter :: KWM = 666, KWM2 = 667
#define KWM2 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp018.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KLM rescan with #undef (so rescan is after expansion)
integer, parameter :: KWM2 = 777, KWM = 667
#define KWM2 666
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp019.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM rescan
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp020.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM expansion of argument
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp021.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KWM NOT expanded in 'literal'
#define KWM 666
character(len=3) :: ch
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp022.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KWM NOT expanded in "literal"
#define KWM 666
character(len=3) :: ch
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp023.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KWM NOT expanded in 9HHOLLERITH literal
#define KWM 666
#define HKWM 667
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp024.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KWM NOT expanded in Hollerith in FORMAT
#define KWM 666
#define HKWM 667
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp025.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* KWM expansion is before token pasting due to fixed-form space removal
integer, parameter :: IKWM2Z = 777
#define KWM KWM2
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp026.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* ## token pasting works in FLM
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp027.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* #DEFINE works in fixed form
integer, parameter :: KWM = 666
#DEFINE KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp028.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* fixed-form clipping done before KWM expansion on source line
integer, parameter :: KW = 777
#define KWM 666
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp029.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* \ newline allowed in #define
integer, parameter :: KWM = 666
#define KWM 77\
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp030.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* /* C comment */ erased from #define
integer, parameter :: KWM = 666
#define KWM 777 /* C comment */
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp031.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* // C++ comment NOT erased from #define
integer, parameter :: KWM = 666
#define KWM 777 // C comment
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp032.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* /* C comment */ \ newline erased from #define
integer, parameter :: KWM = 666
#define KWM 77/* C comment */\
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp033.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* /* C comment \ newline */ erased from #define
integer, parameter :: KWM = 666
#define KWM 77/* C comment \
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp034.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* \ newline allowed in name on KWM definition
integer, parameter :: KWMC = 666
#define KWM\
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp035.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* #if 2 .LT. 3 works
integer, parameter :: KWM = 666
#if 2 .LT. 3
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp036.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* #define FALSE TRUE ... .FALSE. -> .TRUE.
#define FALSE TRUE
if (.FALSE.) then
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp037.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* fixed-form clipping NOT applied to #define
integer, parameter :: KWM = 666
* 1 2 3 4 5 6 7
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp038.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM call with closing ')' on next line (not a continuation)
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp039.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* FLM call with '(' on next line (not a continuation)
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp040.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* #define KWM c, then KWM works as comment line initiator
#define KWM c
KWM print *, 'pp040.F FAIL HARD!'; stop
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp041.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* use KWM expansion as continuation indicators
#define KWM 0
#define KWM2 1
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp042.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* #define c 1, then use c as label in fixed-form
#define c 1
c print *, 'pp042.F pass'; goto 2
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp043.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* #define with # in column 6 is a continuation line in fixed-form
integer, parameter :: defineKWM666 = 555
integer, parameter :: KWM =
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp044.F
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
* #define directive amid continuations
integer, parameter :: KWM = 222, KWM111 = 333, KWM222 = 555
integer, parameter :: KWMKWM = 333
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp101.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! keyword macros
integer, parameter :: KWM = 666
#define KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp102.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! #undef
integer, parameter :: KWM = 777
#define KWM 666
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp103.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! function-like macros
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp104.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! KWMs case-sensitive
integer, parameter :: KWM = 777
#define KWM 666
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp105.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! KWM call name split across continuation, with leading &
integer, parameter :: KWM = 666
#define KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp106.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! ditto, with & ! comment
integer, parameter :: KWM = 666
#define KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp107.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! KWM call name split across continuation, no leading &, with & ! comment
integer, parameter :: KWM = 666
#define KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp108.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! ditto, but without & ! comment
integer, parameter :: KWM = 666
#define KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp109.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! FLM call name split with leading &
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp110.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! ditto, with & ! comment
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp111.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! FLM call name split across continuation, no leading &, with & ! comment
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp112.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! ditto, but without & ! comment
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp113.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! FLM call split across continuation between name and (, leading &
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp114.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! ditto, with & ! comment, leading &
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp115.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! ditto, with & ! comment, no leading &
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp116.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! FLM call split between name and (, no leading &
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp117.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! KWM rescan
integer, parameter :: KWM = 666, KWM2 = 667
#define KWM2 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp118.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! KWM rescan with #undef, proving rescan after expansion
integer, parameter :: KWM2 = 777, KWM = 667
#define KWM2 666
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp119.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! FLM rescan
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp120.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! FLM expansion of argument
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp121.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! KWM NOT expanded in 'literal'
#define KWM 666
character(len=3) :: ch
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp122.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! KWM NOT expanded in "literal"
#define KWM 666
character(len=3) :: ch
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp123.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! KWM NOT expanded in Hollerith literal
#define KWM 666
#define HKWM 667
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp124.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! KWM NOT expanded in Hollerith in FORMAT
#define KWM 666
#define HKWM 667
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp125.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! #DEFINE works in free form
integer, parameter :: KWM = 666
#DEFINE KWM 777
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp126.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! \ newline works in #define
integer, parameter :: KWM = 666
#define KWM 77\
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp127.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! FLM call with closing ')' on next line (not a continuation)
integer function IFLM(x)
integer :: x
Expand Down
1 change: 1 addition & 0 deletions test/Preprocessing/pp128.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
! RUN: %flang -E %s
! FLM call with '(' on next line (not a continuation)
integer function IFLM(x)
integer :: x
Expand Down
Loading

0 comments on commit c22ce5e

Please sign in to comment.