Skip to content

Commit

Permalink
Adjust tests based on rebase and a silly mistake when porting test in…
Browse files Browse the repository at this point in the history
…to offload folder
  • Loading branch information
agozillon committed Jun 24, 2024
1 parent d317ea9 commit 7618ebb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
4 changes: 2 additions & 2 deletions flang/test/Lower/OpenMP/common-block-map.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s

!CHECK: fir.global common @var_common_(dense<0> : vector<8xi8>) : !fir.array<8xi8>
!CHECK: fir.global common @var_common_link_(dense<0> : vector<8xi8>) {omp.declare_target = #omp.declaretarget<device_type = (any), capture_clause = (link)>} : !fir.array<8xi8>
!CHECK: fir.global common @var_common_(dense<0> : vector<8xi8>) {{.*}} : !fir.array<8xi8>
!CHECK: fir.global common @var_common_link_(dense<0> : vector<8xi8>) {{{.*}} omp.declare_target = #omp.declaretarget<device_type = (any), capture_clause = (link)>} : !fir.array<8xi8>

!CHECK-LABEL: func.func @_QPmap_full_block
!CHECK: %[[CB_ADDR:.*]] = fir.address_of(@var_common_) : !fir.ref<!fir.array<8xi8>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,11 @@ program main
!$omp end target

call modify_2
call modify_3

print *, var1
print *, var2
print *, var3

call modify_3

if (var1 /= 20) then
print*, "======= FORTRAN Test Failed! ======="
stop 1
end if

if (var2 /= 100) then
print*, "======= FORTRAN Test Failed! ======="
stop 1
end if

if (var3 /= 60) then
print*, "======= FORTRAN Test Failed! ======="
stop 1
end if

print*, "======= FORTRAN Test Passed! ======="
end program

subroutine modify_1
Expand All @@ -71,11 +53,6 @@ subroutine modify_2
!$omp end target

print *, copy

if (copy /= 80) then
print*, "======= FORTRAN Test Failed! ======="
stop 1
end if
end

subroutine modify_3
Expand Down

0 comments on commit 7618ebb

Please sign in to comment.