[flang-commits] [flang] [llvm] [Flang][OpenMP] Support nested derived types in DO CONCURRENT device conversion (PR #218963)
via flang-commits
flang-commits at lists.llvm.org
Sat Sep 5 09:58:42 PDT 2026
================
@@ -0,0 +1,50 @@
+! Verifies that `do concurrent` correctly lowers map for basic nested derived
+! types, correctly mapping the required components of the derived type.
+! REQUIRES: flang, amdgpu
+
+! RUN: %libomptarget-compile-fortran-generic -fdo-concurrent-to-openmp=device
+! RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic
+program main
+ implicit none
+
+ type :: alloc_buffer
+ integer :: i
+ real, allocatable :: data(:)
+ end type alloc_buffer
+
+ type :: buffer
+ integer :: i
+ real :: data(8)
+ end type buffer
+
+ type :: array_dt
+ type(buffer) :: buf
+ end type array_dt
+
+ type :: alloc_array_dt
+ type(alloc_buffer) :: buf
----------------
MattPD wrote:
I confirmed that both elements are now updated correctly on the device. Thanks!
https://github.com/llvm/llvm-project/pull/218963
More information about the flang-commits
mailing list