https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120753
--- Comment #4 from Benjamin Schulz <schulz.benjamin at googlemail dot com> --- Comment on attachment 61753 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61753 mdspan_omp.h #include <omp.h> struct mytensor { int *strides; int *extents; double *data; }; int main() { mytensor t; t.data=(double*)omp_target_alloc(sizeof(double)*20,omp_get_default_device()); #pragma omp target teams distribute is_device_ptr(t.data) for(size_t i=1;i<20;i++) { t.data[i]=20; } }