1 ! RUN: %flang_fc1 -fdebug-unparse-no-sema -fopenmp %s | FileCheck --ignore-case %s
2 ! Verifies the unparsing of the Openmp Target Device constructs
9 !--------------------------------------------
11 !--------------------------------------------
12 !CHECK: !$OMP TARGET DEVICE(0)
13 !CHECK: !$OMP END TARGET
14 !$OMP TARGET DEVICE(0)
18 !--------------------------------------------
19 ! constant expression argument
20 !--------------------------------------------
21 !CHECK: !$OMP TARGET DEVICE(2+1)
22 !CHECK: !$OMP END TARGET
23 !$OMP TARGET DEVICE(2+1)
27 !--------------------------------------------
29 !--------------------------------------------
30 !CHECK: !$OMP TARGET DEVICE(X)
31 !CHECK: !$OMP END TARGET
32 !$OMP TARGET DEVICE(X)
36 !--------------------------------------------
37 ! variable expression argument
38 !--------------------------------------------
39 !CHECK: !$OMP TARGET DEVICE(X-Y)
40 !CHECK: !$OMP END TARGET
41 !$OMP TARGET DEVICE(X-Y)
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)
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)
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)
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)