================ @@ -0,0 +1,47 @@ +! Offloading test checking lowering of arrays with dynamic extents. +! REQUIRES: flang, amdgpu + +! RUN: %libomptarget-compile-fortran-run-and-check-generic + +program test_openmp_mapper + implicit none + integer, parameter :: n = 1024 + type :: mytype + integer :: data(n) + end type mytype + + ! Declare custom mappers for the derived type `mytype` + !$omp declare mapper(my_mapper1 : mytype :: t) map(to: t%data) + !$omp declare mapper(my_mapper2 : mytype :: t) map(mapper(my_mapper1): t%data) ---------------- skatrak wrote:
I don't know if I follow this example. `my_mapper1` is a mapper for a `mytype` data type, so it shouldn't be applicable to an `integer(n)`, which is what `t%data` here represents (which is also not a derived type). Am I misunderstanding something here? https://github.com/llvm/llvm-project/pull/124746 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits