Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / openmp / libomptarget / test / offloading / fortran / failing / target_map_common_block1.f90
blob235da47a9103a8ad6391bd683ce8e74346dfafff
1 ! REQUIRES: flang, amdgcn-amd-amdhsa
2 ! UNSUPPORTED: nvptx64-nvidia-cuda
3 ! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
4 ! UNSUPPORTED: aarch64-unknown-linux-gnu
5 ! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
6 ! UNSUPPORTED: x86_64-pc-linux-gnu
7 ! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
9 ! RUN: %libomptarget-compile-fortran-run-and-check-generic
10 ! XFAIL: *
12 program main
13 use omp_lib
14 integer :: devices(2), var1
15 common var1
16 var1 = 10
17 print *, "var1 before target = ", var1
18 devices(1) = omp_get_device_num()
19 !$omp target map(tofrom:devices) map(tofrom:var1)
20 var1 = 20
21 devices(2) = omp_get_device_num()
22 !$omp end target
23 print *, "var1 after target = ", var1
24 print *, "devices: ", devices
25 end program
27 ! CHECK: var1 before target = 10
28 ! CHECK: var1 after target = 20
29 ! CHECK: devices: 1 0