[OpenMP, Fortran] Add structure/derived-type element mapping
authorTobias Burnus <tobias@codesourcery.com>
Tue, 14 Jul 2020 11:39:46 +0000 (13:39 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 14 Jul 2020 11:39:46 +0000 (13:39 +0200)
commit102502e32ea4e8a75d6b252ba319d09d735d9aa7
tree6f36014d56cdeb71b20c56fc9ad303762388519a
parent174e79bf73331b41b7a14dffd45ed8293487f0e0
[OpenMP, Fortran] Add structure/derived-type element mapping

gcc/fortran/ChangeLog:

* openmp.c (gfc_match_omp_clauses): Match also derived-type
component refs in OMP_CLAUSE_MAP.
(resolve_omp_clauses): Resolve those.
* trans-openmp.c (gfc_trans_omp_array_section, gfc_trans_omp_clauses):
Handle OpenMP structure-element mapping.
(gfc_trans_oacc_construct, gfc_trans_oacc_executable_directive,
(gfc_trans_oacc_combined_directive, gfc_trans_oacc_declare): Update
add openacc=true in gfc_trans_omp_clauses call.

gcc/testsuite/ChangeLog:

* gfortran.dg/goacc/finalize-1.f: Update dump scan pattern.
* gfortran.dg/gomp/map-1.f90: Update dg-error.
* gfortran.dg/gomp/map-2.f90: New test.

libgomp/ChangeLog:

* testsuite/libgomp.fortran/struct-elem-map-1.f90: New test.
gcc/fortran/openmp.c
gcc/fortran/trans-openmp.c
gcc/testsuite/gfortran.dg/goacc/finalize-1.f
gcc/testsuite/gfortran.dg/gomp/map-1.f90
gcc/testsuite/gfortran.dg/gomp/map-2.f90 [new file with mode: 0644]
libgomp/testsuite/libgomp.fortran/struct-elem-map-1.f90 [new file with mode: 0644]