I recently saw that gfortran does not support derived type components with 'target update', an OpenMP 5.0 feature. When adding it, I also found out that strides where not handled. There is probably some room of improvement about what to copy and what not, but copying too much should be fine. Build + (reg)tested on x86_64-gnu-linux without offloading configured + libgomp tested on x86_64-gnu-linux with nvptx offloading. OK for mainline? * * * PS: Follow-up work items: * Strides: OpenMP seemingly permits also 'a%b([1,6,19,12])' as long as the first index has the lowest address. – And also 'a%b(:)%c' is permitted – both not handled in this patch (and rejected with a compile-time error) * There seems to be some problems with 'alloc' with pointers and allocatables in components – but I have not rechecked. * For allocatables, 'target update' needs to do a deep mapping; I need to check whether that's the case. Note for the last two: allocatable components only works OG11/OG12 and I urgently need to cleanup + (re)submit that patch to mainline. (It came too late for GCC 12.) * There might be also some issue mapping/refcounting, which I have not investigated - affecting the 'target exit data' of target-11.f90. PPS: I intent to file at least one/some PRs about those issues, unless I can fix them quickly. ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955