mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-03 05:32:24 +00:00
[flang][driver] Update PP tests to use the new driver
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
This commit is contained in:
parent
171d12489f
commit
1c8f199f44
@ -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
|
||||
|
@ -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__
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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 /
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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'
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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 !
|
||||
|
@ -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 &
|
||||
|
@ -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])
|
||||
|
Loading…
x
Reference in New Issue
Block a user