This is an improved version of the previous series that was posted at:
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652680.html
Compared to the previous version, this version delays the gimplification
of iterators until the very end of gimplify_adjust_omp_clauses (instead
of doing it in gimplify_scan_omp_clauses and skipping everything
afterwards as before), so that iterator clauses undergo the same
transformations as other clauses. This reduces the amount of special
cases required for iterators and should hopefully work better going
forward. The number of special cases has also been reduced in the OMP
lowering stage.
I have also added support for Fortran in addition to C/C++. As Fortran
does not directly support array of pointers like C/C++, some special
handling was required to support struct field maps, which are used when
an array of derived types (which can contain a pointer field) is mapped.
Tested with NVPTX offloading on an x86_64 host.
Kwok