[LVI][CVP] Add test for trunc bittest. (NFC)
[llvm-project.git] / flang / test / Parser / OpenMP / target_device_unparse.f90
blob403b64887e747c9f1cee6eef0bd2829d363b7da7
1 ! RUN: %flang_fc1 -fdebug-unparse-no-sema -fopenmp %s | FileCheck --ignore-case %s
2 ! Verifies the unparsing of the Openmp Target Device constructs
3 PROGRAM main
4 USE OMP_LIB
5 IMPLICIT NONE
6 INTEGER:: X, Y
7 INTEGER:: M = 1
9 !--------------------------------------------
10 ! constant argument
11 !--------------------------------------------
12 !CHECK: !$OMP TARGET DEVICE(0)
13 !CHECK: !$OMP END TARGET
14 !$OMP TARGET DEVICE(0)
15 M = M + 1
16 !$OMP END TARGET
18 !--------------------------------------------
19 ! constant expression argument
20 !--------------------------------------------
21 !CHECK: !$OMP TARGET DEVICE(2+1)
22 !CHECK: !$OMP END TARGET
23 !$OMP TARGET DEVICE(2+1)
24 M = M + 1
25 !$OMP END TARGET
27 !--------------------------------------------
28 ! variable argument
29 !--------------------------------------------
30 !CHECK: !$OMP TARGET DEVICE(X)
31 !CHECK: !$OMP END TARGET
32 !$OMP TARGET DEVICE(X)
33 M = M + 1
34 !$OMP END TARGET
36 !--------------------------------------------
37 ! variable expression argument
38 !--------------------------------------------
39 !CHECK: !$OMP TARGET DEVICE(X-Y)
40 !CHECK: !$OMP END TARGET
41 !$OMP TARGET DEVICE(X-Y)
42 M = M + 1
43 !$OMP END TARGET
45 !--------------------------------------------
46 ! Ancestor followed by constant argument
47 !--------------------------------------------
48 !CHECK: !$OMP TARGET DEVICE(ANCESTOR: 0)
49 !CHECK: !$OMP END TARGET
50 !$OMP TARGET DEVICE(ANCESTOR: 0)
51 M = M + 1
52 !$OMP END TARGET
54 !--------------------------------------------
55 ! Device_Num followed by constant argument
56 !--------------------------------------------
57 !CHECK: !$OMP TARGET DEVICE(DEVICE_NUM: 1)
58 !CHECK: !$OMP END TARGET
59 !$OMP TARGET DEVICE(DEVICE_NUM: 1)
60 M = M + 1
61 !$OMP END TARGET
63 !--------------------------------------------
64 ! Ancestor followed by variable expression argument
65 !--------------------------------------------
66 !CHECK: !$OMP TARGET DEVICE(ANCESTOR: X+Y)
67 !CHECK: !$OMP END TARGET
68 !$OMP TARGET DEVICE(ANCESTOR: X + Y)
69 M = M + 1
70 !$OMP END TARGET
72 !--------------------------------------------
73 ! Device_Num followed by variable expression argument
74 !--------------------------------------------
75 !CHECK: !$OMP TARGET DEVICE(DEVICE_NUM: X-Y)
76 !CHECK: !$OMP END TARGET
77 !$OMP TARGET DEVICE(DEVICE_NUM: X - Y)
78 M = M + 1
79 !$OMP END TARGET
80 END PROGRAM