OSDN Git Service

[flang][driver] Update PP tests to use the new driver
authorFaris Rehman <faris.rehman@arm.com>
Mon, 25 Jan 2021 12:07:17 +0000 (12:07 +0000)
committerFaris Rehman <faris.rehman@arm.com>
Mon, 25 Jan 2021 12:32:23 +0000 (12:32 +0000)
Update the preprocessor regression tests to use the new driver if the new driver is built (FLANG_BUILD_NEW_DRIVER=On), otherwise the tests will still run using f18.

Summary of changes:
- Introduce %flang to the regression tests, which points to the new driver if it is built or otherwise points to f18
- Update all tests in flang/test/Preprocessing/ to use %flang

Differential Revision: https://reviews.llvm.org/D94805

81 files changed:
flang/test/Preprocessing/assert.F90
flang/test/Preprocessing/compiler_defined_macros.F90
flang/test/Preprocessing/defines.F90
flang/test/Preprocessing/fixed-rescan.F
flang/test/Preprocessing/hollerith.f
flang/test/Preprocessing/include-comment.F90
flang/test/Preprocessing/pp001.F
flang/test/Preprocessing/pp002.F
flang/test/Preprocessing/pp003.F
flang/test/Preprocessing/pp004.F
flang/test/Preprocessing/pp005.F
flang/test/Preprocessing/pp006.F
flang/test/Preprocessing/pp007.F
flang/test/Preprocessing/pp008.F
flang/test/Preprocessing/pp009.F
flang/test/Preprocessing/pp010.F
flang/test/Preprocessing/pp011.F
flang/test/Preprocessing/pp012.F
flang/test/Preprocessing/pp013.F
flang/test/Preprocessing/pp014.F
flang/test/Preprocessing/pp015.F
flang/test/Preprocessing/pp016.F
flang/test/Preprocessing/pp017.F
flang/test/Preprocessing/pp018.F
flang/test/Preprocessing/pp019.F
flang/test/Preprocessing/pp020.F
flang/test/Preprocessing/pp021.F
flang/test/Preprocessing/pp022.F
flang/test/Preprocessing/pp023.F
flang/test/Preprocessing/pp024.F
flang/test/Preprocessing/pp025.F
flang/test/Preprocessing/pp026.F
flang/test/Preprocessing/pp027.F
flang/test/Preprocessing/pp028.F
flang/test/Preprocessing/pp029.F
flang/test/Preprocessing/pp030.F
flang/test/Preprocessing/pp031.F
flang/test/Preprocessing/pp032.F
flang/test/Preprocessing/pp033.F
flang/test/Preprocessing/pp034.F
flang/test/Preprocessing/pp035.F
flang/test/Preprocessing/pp036.F
flang/test/Preprocessing/pp037.F
flang/test/Preprocessing/pp038.F
flang/test/Preprocessing/pp039.F
flang/test/Preprocessing/pp040.F
flang/test/Preprocessing/pp041.F
flang/test/Preprocessing/pp042.F
flang/test/Preprocessing/pp043.F
flang/test/Preprocessing/pp044.F
flang/test/Preprocessing/pp101.F90
flang/test/Preprocessing/pp102.F90
flang/test/Preprocessing/pp103.F90
flang/test/Preprocessing/pp104.F90
flang/test/Preprocessing/pp105.F90
flang/test/Preprocessing/pp106.F90
flang/test/Preprocessing/pp107.F90
flang/test/Preprocessing/pp108.F90
flang/test/Preprocessing/pp109.F90
flang/test/Preprocessing/pp110.F90
flang/test/Preprocessing/pp111.F90
flang/test/Preprocessing/pp112.F90
flang/test/Preprocessing/pp113.F90
flang/test/Preprocessing/pp114.F90
flang/test/Preprocessing/pp115.F90
flang/test/Preprocessing/pp116.F90
flang/test/Preprocessing/pp117.F90
flang/test/Preprocessing/pp118.F90
flang/test/Preprocessing/pp119.F90
flang/test/Preprocessing/pp120.F90
flang/test/Preprocessing/pp121.F90
flang/test/Preprocessing/pp122.F90
flang/test/Preprocessing/pp123.F90
flang/test/Preprocessing/pp124.F90
flang/test/Preprocessing/pp125.F90
flang/test/Preprocessing/pp126.F90
flang/test/Preprocessing/pp127.F90
flang/test/Preprocessing/pp128.F90
flang/test/Preprocessing/pp129.F90
flang/test/Preprocessing/pp130.F90
flang/test/lit.cfg.py

index 64d49e6..5d4837e 100644 (file)
@@ -1,4 +1,4 @@
-!RUN: %f18 -E %s 2>&1 | FileCheck %s
+!RUN: %flang -E %s 2>&1 | FileCheck %s
 !CHECK: if(.not.(.true.)) error stop "assert(" // ".TRUE." // ") failed " // "at ""
 !CHECK-SAME: assert.F90"": " // "7"
 #define STR(x) #x
index ba20f6d..f5f955b 100644 (file)
@@ -3,7 +3,7 @@
 !CHECK: flang_major = {{[1-9][0-9]*$}}
 !CHECK: flang_minor = {{[0-9]+$}}
 !CHECK: flang_patchlevel = {{[0-9]+$}}
-!RUN: %f18 -E %s | FileCheck  --ignore-case %s
+!RUN: %flang -E %s | FileCheck  --ignore-case %s
 
   
 integer, parameter :: flang_major = __flang_major__
index 449c54c..d59789f 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E -DFOO=1 -DBAR=2 %s | FileCheck %s
+! RUN: %flang -E -DFOO=1 -DBAR=2 %s | FileCheck %s
 
 ! CHECK: integer :: a = 1
   integer :: a = FOO
index 3d6ba9a..ac983e7 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s | FileCheck %s
+! RUN: %flang -E %s | FileCheck %s
 ! CHECK: callbar
 ! Ensure that rescanned lines after macro replacement are not
 ! misinterpreted as fixed-form comments when they start with C or D.
index 0c920e0..5f20259 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: character*1hi
 ! CHECK: dataa/1*1h /
 ! CHECK: datab/1*1h /
index 6ac475f..239d9b7 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -I%S -E %s 2>&1 | FileCheck %s
+! RUN: %flang -I%S -E %s 2>&1 | FileCheck %s
 ! CHECK-NOT: :3:
 #include <empty.h> ! comment
 ! CHECK-NOT: :5:
index 9519864..455da73 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777.eq.777)then
 * keyword macros
       integer, parameter :: KWM = 666
index b4cbd75..d673fcd 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(kwm.eq.777)then
 * #undef
       integer, parameter :: KWM = 777
index 4df10c4..2062dbc 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * function-like macros
       integer function IFLM(x)
index 788d368..f5724df 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(kwm.eq.777)then
 * KWMs case-sensitive
       integer, parameter :: KWM = 777
index 390e662..48cf12d 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=777
 * KWM split across continuation, implicit padding
       integer, parameter :: KWM = 666
index 3c44728..f878bfd 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=777
 * ditto, but with intervening *comment line
       integer, parameter :: KWM = 666
index ca78f4f..a5d871a 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=kwm
 * KWM split across continuation, clipped after column 72
       integer, parameter :: KWM = 666
index 9dd7bd9..7e580ef 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=kwm
 * KWM with spaces in name at invocation NOT replaced
       integer, parameter :: KWM = 777
index c29021d..b6a6249 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * FLM call split across continuation, implicit padding
       integer function IFLM(x)
index 4a812cd..e860bd9 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * ditto, but with intervening *comment line
       integer function IFLM(x)
index c106c8b..af0e0e8 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=iflm(666)
 * FLM call name split across continuation, clipped
       integer function IFLM(x)
index 411cfb8..12ab612 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * FLM call name split across continuation
       integer function IFLM(x)
index f05e2e3..07bb25e 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * FLM call split between name and (
       integer function IFLM(x)
index 4709660..7ac5d38 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * FLM call split between name and (, with intervening *comment
       integer function IFLM(x)
index 8320bd7..700da10 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * FLM call split between name and (, clipped
       integer function IFLM(x)
index 95c89f8..c5d90e7 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * FLM call split between name and ( and in argument
       integer function IFLM(x)
index a11f185..49fff58 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777.eq.777)then
 * KLM rescan
       integer, parameter :: KWM = 666, KWM2 = 667
index 69c24e5..d6a4216 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(kwm2.eq.777)then
 * KLM rescan with #undef (so rescan is after expansion)
       integer, parameter :: KWM2 = 777, KWM = 667
index d607ad3..a8c0ff6 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * FLM rescan
       integer function IFLM(x)
index 8852500..9fe9630 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((111)+666)
 * FLM expansion of argument
       integer function IFLM(x)
index 1662a68..2936264 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: ch='KWM'
 ! CHECK: if(ch.eq.'KWM')then
 * KWM NOT expanded in 'literal'
index 026c02e..647b683 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: ch="KWM"
 ! CHECK: if(ch.eq.'KWM')then
 * KWM NOT expanded in "literal"
index a0d053f..ecad31b 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: ch=3hKWM
 ! CHECK: if(ch.eq.'KWM')then
 * KWM NOT expanded in 9HHOLLERITH literal
index 6ea76cc..7f8e3bb 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: 100format(3hKWM)
 ! CHECK: if(ch.eq.'KWM')then
 * KWM NOT expanded in Hollerith in FORMAT
index 49521d4..bb7bc21 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=ikwm2z
 * KWM expansion is before token pasting due to fixed-form space removal
       integer, parameter :: IKWM2Z = 777
index b551f3b..e377001 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((111)+666)
 * ## token pasting works in FLM
       integer function IFLM(x)
index c1b787f..577bd48 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: kwm=666
 ! CHECK: if(777.eq.777)then
 * #DEFINE works in fixed form
index 51eab84..3530628 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=kw
 * fixed-form clipping done before KWM expansion on source line
       integer, parameter :: KW = 777
index 9be309f..23c0d33 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777.eq.777)then
 * \ newline allowed in #define
       integer, parameter :: KWM = 666
index c04cf94..91b1217 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777.eq.777)then
 * /* C comment */ erased from #define
       integer, parameter :: KWM = 666
index 90b1464..d828616 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777//ccomment.eq.777)then
 ! CHECK: print*,'pp031.F no: ',777//ccomment
 *  // C++ comment NOT erased from #define
index 6b77914..22350e7 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777.eq.777)then
 ! CHECK: print*,'pp032.F no: ',777
 * /* C comment */ \ newline erased from #define
index 3364527..1b32ae6 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777.eq.777)then
 ! CHECK: print*,'pp033.F no: ',777
 * /* C comment \ newline */ erased from #define
index 0c64aca..d9f8a72 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777.eq.777)then
 ! CHECK: print*,'pp034.F no: ',777
 * \ newline allowed in name on KWM definition
index 8081741..0c0152a 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777.eq.777)then
 ! CHECK: print*,'pp035.F no: ',777
 * #if 2 .LT. 3 works
index b7024c4..7894255 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(.true.)then
 ! CHECK: print*,'pp036.F no: ',.true.
 * #define FALSE TRUE ...  .FALSE. -> .TRUE.
index 52bfa8f..93c9b28 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(7777.eq.777)then
 ! CHECK: print*,'pp037.F no: ',7777
 * fixed-form clipping NOT applied to #define
index 7386aee..655551b 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=((666)+111)
 * FLM call with closing ')' on next line (not a continuation)
       integer function IFLM(x)
index 9124474..f80e0b0 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res=iflm
 ! CHECK: (666)
 ! CHECK-NOT: res=((666)+111)
index d589c38..a3c2a6b 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK-NOT: FAIL HARD!
 * #define KWM c, then KWM works as comment line initiator
 #define KWM c
index dcf6153..9bc04db 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: j=666wmj=j+1wm211
 * use KWM expansion as continuation indicators
 #define KWM 0
index d5cc46a..e5a679e 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK-NOT: goto 2
 * #define c 1, then use c as label in fixed-form
 #define c 1
index a079466..d8ed6b1 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(kwm.eq.777)then
 * #define with # in column 6 is a continuation line in fixed-form
       integer, parameter :: defineKWM666 = 555
index c14b29c..a699c08 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK-NOT:z=111
 * #define directive amid continuations
       integer, parameter :: KWM = 222, KWM111 = 333, KWM222 = 555
index b0f8601..dbf2aa9 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK:  if(777 .eq. 777) then
 ! keyword macros
       integer, parameter :: KWM = 666
index e2c3207..73d931a 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(kwm .eq. 777) then
 ! #undef
       integer, parameter :: KWM = 777
index 3309d7f..0384d8c 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = ((666)+111)
 ! function-like macros
       integer function IFLM(x)
index 51248c2..95653ff 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(kwm .eq. 777) then
 ! KWMs case-sensitive
       integer, parameter :: KWM = 777
index 898a4a1..b4f73da 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = 777
 ! KWM call name split across continuation, with leading &
       integer, parameter :: KWM = 666
index d83085f..556d779 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = 777
 ! ditto, with & ! comment
       integer, parameter :: KWM = 666
index 6973127..51aa750 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = kwm
 ! KWM call name split across continuation, no leading &, with & ! comment
       integer, parameter :: KWM = 666
index b07ec98..d891bf3 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = kwm
 ! ditto, but without & ! comment
       integer, parameter :: KWM = 666
index e75fd10..b488049 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = ((666)+111)
 ! FLM call name split with leading &
       integer function IFLM(x)
index 681408e..3f6180c 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = ((666)+111)
 ! ditto, with & ! comment
       integer function IFLM(x)
index 4b49bf6..b0b1219 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = iflm (666)
 ! FLM call name split across continuation, no leading &, with & ! comment
       integer function IFLM(x)
index 9828366..1a3cf3f 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = iflm (666)
 ! ditto, but without & ! comment
       integer function IFLM(x)
index 56e3438..9604316 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = ((666)+111)
 ! FLM call split across continuation between name and (, leading &
       integer function IFLM(x)
index 4c44759..c44ca7d 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = ((666)+111)
 ! ditto, with & ! comment, leading &
       integer function IFLM(x)
index 290f62e..29b5802 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = iflm (666)
 ! ditto, with & ! comment, no leading &
       integer function IFLM(x)
index d41fab7..9e070ba 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = iflm (666)
 ! FLM call split between name and (, no leading &
       integer function IFLM(x)
index c8d1c2f..bb0692c 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777 .eq. 777) then
 ! KWM rescan
       integer, parameter :: KWM = 666, KWM2 = 667
index e71cc41..fe24d83 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(kwm2 .eq. 777) then
 ! KWM rescan with #undef, proving rescan after expansion
       integer, parameter :: KWM2 = 777, KWM = 667
index ea9a15c..514bff0 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = ((666)+111)
 ! FLM rescan
       integer function IFLM(x)
index 9c4b88c..510550b 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = ((111)+666)
 ! FLM expansion of argument
       integer function IFLM(x)
index cdf25e1..900e255 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: ch = 'KWM'
 ! CHECK: if(ch .eq. 'KWM') then
 ! KWM NOT expanded in 'literal'
index 14c8762..8051cbd 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: ch = "KWM"
 ! KWM NOT expanded in "literal"
 #define KWM 666
index 1768cec..8181b68 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: ch = 3hKWM
 ! KWM NOT expanded in Hollerith literal
 #define KWM 666
index bb01151..750f9fa 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: 100 format(3hKWM)
 ! KWM NOT expanded in Hollerith in FORMAT
 #define KWM 666
index cf3909b..86abccc 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777 .eq. 777) then
 ! #DEFINE works in free form
       integer, parameter :: KWM = 666
index fefb7fc..f41af1e 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: if(777 .eq. 777) then
 ! \ newline works in #define
       integer, parameter :: KWM = 666
index 08feedf..09de8ed 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = iflm(666 )
 ! FLM call with closing ')' on next line (not a continuation)
       integer function IFLM(x)
index 46918e0..a8bc792 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK: res = iflm
 ! FLM call with '(' on next line (not a continuation)
       integer function IFLM(x)
index ab7e7f0..dee4c7b 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: %f18 -E %s 2>&1 | FileCheck %s
+! RUN: %flang -E %s 2>&1 | FileCheck %s
 ! CHECK-NOT: stop
 ! #define KWM !, then KWM works as comment line initiator
 #define KWM !
index be11488..8066e28 100644 (file)
@@ -1,4 +1,4 @@
-! RUN: (%f18 -E %s 2>&1 || true) | FileCheck %s
+! RUN: (%flang -E %s 2>&1 || true) | FileCheck %s
 ! CHECK: error: bad character ('&') in Fortran token
 ! #define KWM &, use for continuation w/o pasting (ifort and nag seem to continue #define)
 #define KWM &
index c9992b7..d724628 100644 (file)
@@ -73,6 +73,11 @@ tools = [
 
 if config.include_flang_new_driver_test:
    tools.append(ToolSubst('%flang-new', command=FindTool('flang-new'), unresolved='fatal'))
+   tools.append(ToolSubst('%flang', command=FindTool('flang-new'), unresolved='fatal'))
+else:
+   tools.append(ToolSubst('%flang', command=FindTool('f18'),
+    extra_args=["-intrinsic-module-directory "+config.flang_intrinsic_modules_dir],
+    unresolved='fatal'))
 
 if config.flang_standalone_build:
     llvm_config.add_tool_substitutions(tools, [config.flang_llvm_tools_dir])