35 lines · plain
1! Tests that we can map "unnamed" and non-reference/non-box values to device; for2! example, values that result from `fix.box_dims` ops.3 4! RUN: %flang_fc1 -emit-hlfir -fopenmp -fdo-concurrent-to-openmp=device %s -o - \5! RUN: | FileCheck %s6! RUN: bbc -emit-hlfir -fopenmp -fdo-concurrent-to-openmp=device %s -o - \7! RUN: | FileCheck %s8 9subroutine test_non_refernece10 integer i11 real, allocatable :: arr(:)12 13 associate(a => arr)14 do concurrent (i = 1:10)15 block16 real z(size(a,1))17 end block18 end do19 end associate20end subroutine test_non_refernece21 22! CHECK: omp.map.info var_ptr(%{{.*}} : !fir.ref<index>, index)23! CHECK: omp.map.info var_ptr(%{{.*}} : !fir.ref<index>, index)24! CHECK: omp.map.info var_ptr(%{{.*}} : !fir.ref<index>, index)25 26! CHECK: %[[DIM_MAP:.*]] = omp.map.info var_ptr(%{{.*}} : !fir.ref<index>, index)27! CHECK-SAME: map_clauses(implicit)28! CHECK-SAME: capture(ByCopy) -> !fir.ref<index> {name = ""}29 30 31! CHECK: omp.target host_eval({{.*}} : index, index, index)32! CHECK-SAME: map_entries({{.*}}, %[[DIM_MAP]] -> %{{.*}} :33! CHECK-SAME: !fir.ref<i32>, !fir.ref<index>)34 35