llvm-c166/offload/test/offloading
Akash Banerjee 2a1200e08c
[Flang][OpenMP] Fix Fortran automap handling (#162501)
This fixes Fortran `declare target enter(automap:...)` handling for
allocatable
descriptors.

- Replace the previous `has_device_addr` target-region rewrite with
explicit
  target data operations around allocation/deallocation.
- On allocation, emit:
  - descriptor `map(always,to)` to keep the Fortran descriptor present
  - storage `map(storage)` for the allocated array data
- `map(attach)` to update the device descriptor base address to the
device data
- On deallocation, delete both the mapped storage and descriptor.
- Add a weak visible offload-entry alias for local/hidden `declare
target to/enter`
globals so libomptarget can associate the host descriptor with the real
device
  global without changing the original symbol linkage.

This fixes `offload/test/offloading/fortran/declare-target-automap.f90`
reported broken in #161265.

Co-authored-by: Codex <codex@openai.com>
2026-07-14 16:03:05 +01:00
..
CUDA
fortran
gpupgo
strided_update
array_reductions.cpp
assert.cpp
atomic-compare-signedness.c
back2back_distribute.c
barrier_fence.c
bug47654.cpp
bug49021.cpp
bug49334.cpp
bug49779.cpp
bug50022.cpp
bug51781.c
bug51982.c
bug53727.cpp
bug64959.c
bug64959_compile_only.c
bug74582.c
complex_reduction.cpp
ctor_dtor.cpp
ctor_dtor_api.cpp
ctor_dtor_lazy.cpp
cuda_no_devices.c
d2d_memcpy.c
d2d_memcpy_sync.c
declare_target_local.cpp
default_thread_limit.c
disable_default_device.c
dyn_groupprivate.cpp
dynamic-schedule-non-spmd.cpp
dynamic-schedule.cpp
dynamic_module.c
dynamic_module_load.c
extern.c
force-usm.cpp
generic_multiple_parallel_regions.c
global_constructor.cpp
high_trip_count_block_limit.cpp
host_as_target.c
indirect_fp_mapping.c
info.c
interop-print.c
interop.c
lone_target_exit_data.c
looptripcnt.c
malloc.c
mandatory_but_no_devices.c
memory_manager.cpp
multiple_reductions.cpp
multiple_reductions_simple.c
non_contiguous_update.cpp
offloading_success.c
offloading_success.cpp
ompx_bare.c
ompx_bare_ballot_sync.c
ompx_bare_gridsize.c
ompx_bare_multi_dim.cpp
ompx_bare_shfl_down_sync.cpp
ompx_coords.c
ompx_saxpy_mixed.c
parallel_offloading_map.cpp
parallel_target_teams_reduction.cpp
parallel_target_teams_reduction_max.cpp
parallel_target_teams_reduction_min.cpp
requires.c
runtime_init.c
schedule.c
shared_lib_fp_mapping.c
single_threaded_for_barrier_hang_1.c
single_threaded_for_barrier_hang_2.c
small_trip_count.c
small_trip_count_thread_limit.cpp
spmdization.c
static_linking.c
std_complex_arithmetic.cpp
struct_mapping_with_pointers.cpp
target-teams-atomic.c
target-tile.c
target_constexpr_mapping.cpp
target_critical_region.cpp
target_depend_nowait.cpp
target_map_for_member_data.cpp
target_nowait_target.cpp
task_in_reduction_target.c
taskloop_offload_nowait.cpp
test_libc.cpp
thread_limit.c
thread_state_1.c
thread_state_2.c
weak.c
workshare_chunk.c
wtime.c
xteam_min_reduction_partial_wave.c