[win/asan] GetInstructionSize: Fix `83 E4 XX` to return 3. (#119644)
[llvm-project.git] / offload / test / offloading / fortran / target-map-second-common-block-member.f90
blob432c6e1f82b9f8a965ad96b10d61a200c6fa756b
1 ! Offloading test checking interaction of mapping a member of a common block to
2 ! a target region
3 ! REQUIRES: flang, amdgcn-amd-amdhsa
4 ! UNSUPPORTED: nvptx64-nvidia-cuda
5 ! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
6 ! UNSUPPORTED: aarch64-unknown-linux-gnu
7 ! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
8 ! UNSUPPORTED: x86_64-unknown-linux-gnu
9 ! UNSUPPORTED: x86_64-unknown-linux-gnu-LTO
11 ! RUN: %libomptarget-compile-fortran-run-and-check-generic
12 program main
13 implicit none
14 common /var_common/ var1, var2
15 integer :: var1, var2
17 call modify_1
19 !$omp target map(tofrom: var2)
20 var2 = var2 + 20
21 !$omp end target
23 call modify_2
25 print *, var1
26 print *, var2
27 end program
29 subroutine modify_1
30 common /var_common/ var1, var2
31 integer :: var1, var2
32 !$omp target map(tofrom: var2)
33 var2 = var2 + 20
34 !$omp end target
35 end
37 subroutine modify_2
38 common /var_common/ var1, var2
39 integer :: var1, var2
40 !$omp target map(tofrom: var2)
41 var2 = var2 * 10
42 !$omp end target
43 end
45 !CHECK: 0
46 !CHECK: 400