[PATCH v4 2/4] OpenMP/OpenACC: Reindent TO/FROM/_CACHE_ stanza in {c_}finish_omp_clause

2022-10-09 Thread Julian Brown
This patch trivially adds braces and reindents the OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza in c_finish_omp_clause and finish_omp_clause, in preparation for the following patch (to clarify the diff a little). 2022-09-13 Julian Brown gcc/c/ * c-typeck.cc (c_finish_omp_cla

[PATCH v4 4/4] OpenMP/OpenACC: Unordered/non-constant component offset struct mapping

2022-10-09 Thread Julian Brown
This patch adds support for non-constant component offsets in "map" clauses for OpenMP (and the equivalants for OpenACC), which are not able to be sorted into order at compile time. Normally struct accesses in such clauses are gathered together and sorted into increasing address order after a "GOM

[PATCH v4 1/4] OpenMP: Pointers and member mappings

2022-10-09 Thread Julian Brown
Implementing the "omp declare mapper" functionality, I noticed some cases where handling of derived type members that are pointers doesn't seem to be quite right. At present, a type such as this: type T integer, pointer, dimension(:) :: arrptr end type T type(T) :: tvar [...] !$omp ta

[PATCH v4 0/4] Fortran pointers and unordered structs

2022-10-09 Thread Julian Brown
This series replaces parts 6-8 in the series: https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601549.html Investigating some of Tobias's questions regarding part 6/11 ("OpenMP: Pointers and member mappings") in that series, I realised that sorting of struct components with non-constant

[PATCH] Fortran: fix check of polymorphic elements in data transfers [PR100971]

2022-10-09 Thread Harald Anlauf via Fortran
Dear all, the check of data transfer elements needs to verify that for polymorphic objects there is a user defined DTIO procedure. This check worked fine for scalars, but skipped arrays, leading to an ICE later. The obvious fix is to allow this check to inspect arrays. Regtested on x86_64-pc-lin