brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 403b648 Raw
81 lines · plain
1! RUN: %flang_fc1 -fdebug-unparse-no-sema -fopenmp %s | FileCheck --ignore-case %s2! Verifies the unparsing of the Openmp Target Device constructs3PROGRAM main4    USE OMP_LIB5    IMPLICIT NONE6    INTEGER:: X, Y7    INTEGER:: M = 18 9!--------------------------------------------10! constant argument11!--------------------------------------------12!CHECK: !$OMP TARGET DEVICE(0)13!CHECK: !$OMP END TARGET14!$OMP TARGET DEVICE(0)15  M = M + 116!$OMP END TARGET17 18!--------------------------------------------19! constant expression argument20!--------------------------------------------21!CHECK: !$OMP TARGET DEVICE(2+1)22!CHECK: !$OMP END TARGET23!$OMP TARGET DEVICE(2+1)24  M = M + 125!$OMP END TARGET26 27!--------------------------------------------28! variable argument29!--------------------------------------------30!CHECK: !$OMP TARGET DEVICE(X)31!CHECK: !$OMP END TARGET32!$OMP TARGET DEVICE(X)33  M = M + 134!$OMP END TARGET35 36!--------------------------------------------37! variable expression argument38!--------------------------------------------39!CHECK: !$OMP TARGET DEVICE(X-Y)40!CHECK: !$OMP END TARGET41!$OMP TARGET DEVICE(X-Y)42  M = M + 143!$OMP END TARGET44 45!--------------------------------------------46! Ancestor followed by constant argument47!--------------------------------------------48!CHECK: !$OMP TARGET DEVICE(ANCESTOR: 0)49!CHECK: !$OMP END TARGET50!$OMP TARGET DEVICE(ANCESTOR: 0)51  M = M + 152!$OMP END TARGET53 54!--------------------------------------------55! Device_Num followed by constant argument56!--------------------------------------------57!CHECK: !$OMP TARGET DEVICE(DEVICE_NUM: 1)58!CHECK: !$OMP END TARGET59!$OMP TARGET DEVICE(DEVICE_NUM: 1)60  M = M + 161!$OMP END TARGET62 63!--------------------------------------------64! Ancestor followed by variable expression argument65!--------------------------------------------66!CHECK: !$OMP TARGET DEVICE(ANCESTOR: X+Y)67!CHECK: !$OMP END TARGET68!$OMP TARGET DEVICE(ANCESTOR: X + Y)69  M = M + 170!$OMP END TARGET71 72!--------------------------------------------73! Device_Num followed by variable expression argument74!--------------------------------------------75!CHECK: !$OMP TARGET DEVICE(DEVICE_NUM: X-Y)76!CHECK: !$OMP END TARGET77!$OMP TARGET DEVICE(DEVICE_NUM: X - Y)78  M = M + 179!$OMP END TARGET80END PROGRAM81