[PATCH 0/8] OpenMP: lvalue parsing and "declare mapper" support
Julian Brown
julian@codesourcery.com
Tue Sep 5 19:28:20 GMT 2023
This series implements "lvalue" parsing for C and C++ map/to/from clauses,
and "declare mapper" support for C, C++ and Fortran. This is the latter
part of the series that was previously posted for mainline here:
https://gcc.gnu.org/pipermail/gcc-patches/2022-December/609031.html
and is approximately equivalent to the series posted for the og13
branch here:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/623352.html
though with several follow-up patches rolled in (as mentioned on the
following patch-specific emails).
This series applies on top of the infrastructural support series posted
here:
https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627895.html
Tested with offloading to NVPTX and bootstrapped. OK?
Julian Brown (8):
OpenMP: lvalue parsing for map/to/from clauses (C++)
OpenMP: lvalue parsing for map/to/from clauses (C)
OpenMP: C++ "declare mapper" support
OpenMP: Support OpenMP 5.0 "declare mapper" directives for C
OpenMP, Fortran: Pass list number to gfc_free_omp_namelist
OpenMP, Fortran: Per-directive control for gfc_trans_omp_clauses
OpenMP, Fortran: Split out OMP clause checking
OpenMP: Fortran "!$omp declare mapper" support
gcc/c-family/c-common.h | 11 +-
gcc/c-family/c-omp.cc | 500 ++-
gcc/c-family/c-pretty-print.cc | 12 +
gcc/c/c-decl.cc | 169 +
gcc/c/c-objc-common.h | 12 +
gcc/c/c-parser.cc | 472 ++-
gcc/c/c-tree.h | 9 +
gcc/c/c-typeck.cc | 124 +-
gcc/cp/constexpr.cc | 10 +
gcc/cp/cp-gimplify.cc | 6 +
gcc/cp/cp-objcp-common.h | 9 +
gcc/cp/cp-tree.h | 19 +-
gcc/cp/decl.cc | 27 +-
gcc/cp/decl2.cc | 54 +-
gcc/cp/error.cc | 34 +
gcc/cp/parser.cc | 514 ++-
gcc/cp/parser.h | 3 +
gcc/cp/pt.cc | 84 +-
gcc/cp/semantics.cc | 260 +-
gcc/cp/typeck.cc | 50 +
gcc/fortran/dump-parse-tree.cc | 4 +
gcc/fortran/f95-lang.cc | 7 +
gcc/fortran/gfortran.h | 76 +-
gcc/fortran/match.cc | 14 +-
gcc/fortran/match.h | 1 +
gcc/fortran/module.cc | 257 +-
gcc/fortran/openmp.cc | 2026 +++++++----
gcc/fortran/parse.cc | 13 +-
gcc/fortran/resolve.cc | 2 +
gcc/fortran/st.cc | 2 +-
gcc/fortran/symbol.cc | 16 +
gcc/fortran/trans-decl.cc | 33 +-
gcc/fortran/trans-openmp.cc | 592 ++-
gcc/fortran/trans-stmt.h | 1 +
gcc/fortran/trans.h | 3 +
gcc/gimplify.cc | 560 ++-
gcc/langhooks-def.h | 13 +
gcc/langhooks.cc | 35 +
gcc/langhooks.h | 16 +
gcc/omp-general.h | 86 +
.../c-c++-common/gomp/declare-mapper-12.c | 22 +
.../c-c++-common/gomp/declare-mapper-15.c | 59 +
.../c-c++-common/gomp/declare-mapper-16.c | 39 +
.../c-c++-common/gomp/declare-mapper-3.c | 30 +
.../c-c++-common/gomp/declare-mapper-4.c | 78 +
.../c-c++-common/gomp/declare-mapper-5.c | 26 +
.../c-c++-common/gomp/declare-mapper-6.c | 23 +
.../c-c++-common/gomp/declare-mapper-7.c | 29 +
.../c-c++-common/gomp/declare-mapper-8.c | 43 +
.../c-c++-common/gomp/declare-mapper-9.c | 34 +
gcc/testsuite/c-c++-common/gomp/map-6.c | 14 +-
gcc/testsuite/g++.dg/gomp/array-section-1.C | 38 +
gcc/testsuite/g++.dg/gomp/array-section-2.C | 63 +
.../g++.dg/gomp/bad-array-section-1.C | 35 +
.../g++.dg/gomp/bad-array-section-10.C | 35 +
.../g++.dg/gomp/bad-array-section-11.C | 36 +
.../g++.dg/gomp/bad-array-section-2.C | 33 +
.../g++.dg/gomp/bad-array-section-3.C | 28 +
.../g++.dg/gomp/bad-array-section-4.C | 50 +
.../g++.dg/gomp/bad-array-section-5.C | 50 +
.../g++.dg/gomp/bad-array-section-6.C | 24 +
.../g++.dg/gomp/bad-array-section-7.C | 36 +
.../g++.dg/gomp/bad-array-section-8.C | 53 +
.../g++.dg/gomp/bad-array-section-9.C | 39 +
gcc/testsuite/g++.dg/gomp/declare-mapper-1.C | 58 +
gcc/testsuite/g++.dg/gomp/declare-mapper-2.C | 30 +
.../gomp/has_device_addr-non-lvalue-1.C | 36 +
gcc/testsuite/g++.dg/gomp/ind-base-3.C | 37 +
gcc/testsuite/g++.dg/gomp/map-assignment-1.C | 12 +
gcc/testsuite/g++.dg/gomp/map-inc-1.C | 10 +
gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C | 19 +
gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C | 37 +
gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C | 40 +
.../g++.dg/gomp/map-static-cast-lvalue-1.C | 17 +
gcc/testsuite/g++.dg/gomp/map-ternary-1.C | 20 +
gcc/testsuite/g++.dg/gomp/member-array-2.C | 91 +
gcc/testsuite/g++.dg/gomp/pr67522.C | 2 +-
.../gcc.dg/gomp/bad-array-section-c-1.c | 16 +
.../gcc.dg/gomp/bad-array-section-c-2.c | 13 +
.../gcc.dg/gomp/bad-array-section-c-3.c | 24 +
.../gcc.dg/gomp/bad-array-section-c-4.c | 26 +
.../gcc.dg/gomp/bad-array-section-c-5.c | 15 +
.../gcc.dg/gomp/bad-array-section-c-6.c | 16 +
.../gcc.dg/gomp/bad-array-section-c-7.c | 26 +
.../gcc.dg/gomp/bad-array-section-c-8.c | 21 +
gcc/testsuite/gcc.dg/gomp/declare-mapper-10.c | 61 +
gcc/testsuite/gcc.dg/gomp/declare-mapper-11.c | 33 +
.../gfortran.dg/gomp/declare-mapper-1.f90 | 71 +
.../gfortran.dg/gomp/declare-mapper-14.f90 | 26 +
.../gfortran.dg/gomp/declare-mapper-22-p.f90 | 61 +
.../gfortran.dg/gomp/declare-mapper-22.f90 | 63 +
.../gfortran.dg/gomp/declare-mapper-23.f90 | 25 +
.../gfortran.dg/gomp/declare-mapper-26-p.f90 | 29 +
.../gfortran.dg/gomp/declare-mapper-26.f90 | 34 +
.../gfortran.dg/gomp/declare-mapper-29.f90 | 22 +
.../gfortran.dg/gomp/declare-mapper-31-p.f90 | 35 +
.../gfortran.dg/gomp/declare-mapper-31.f90 | 36 +
.../gfortran.dg/gomp/declare-mapper-5.f90 | 45 +
gcc/tree-core.h | 4 +
gcc/tree-pretty-print.cc | 58 +
gcc/tree.cc | 2 +
gcc/tree.def | 10 +
gcc/tree.h | 19 +
include/gomp-constants.h | 11 +-
libgomp/testsuite/libgomp.c++/baseptrs-4.C | 26 +-
libgomp/testsuite/libgomp.c++/baseptrs-6.C | 3199 +++++++++++++++++
.../testsuite/libgomp.c++/declare-mapper-1.C | 87 +
.../testsuite/libgomp.c++/declare-mapper-2.C | 55 +
.../testsuite/libgomp.c++/declare-mapper-3.C | 63 +
.../testsuite/libgomp.c++/declare-mapper-4.C | 63 +
.../testsuite/libgomp.c++/declare-mapper-5.C | 52 +
.../testsuite/libgomp.c++/declare-mapper-6.C | 37 +
.../testsuite/libgomp.c++/declare-mapper-7.C | 48 +
.../testsuite/libgomp.c++/declare-mapper-8.C | 61 +
libgomp/testsuite/libgomp.c++/ind-base-1.C | 162 +
libgomp/testsuite/libgomp.c++/ind-base-2.C | 93 +
.../testsuite/libgomp.c++/lvalue-tofrom-1.C | 75 +
.../testsuite/libgomp.c++/lvalue-tofrom-2.C | 71 +
libgomp/testsuite/libgomp.c++/map-comma-1.C | 15 +
.../testsuite/libgomp.c++/map-rvalue-ref-1.C | 22 +
libgomp/testsuite/libgomp.c++/struct-ref-1.C | 97 +
.../libgomp.c-c++-common/array-field-1.c | 35 +
.../libgomp.c-c++-common/array-of-struct-1.c | 65 +
.../libgomp.c-c++-common/array-of-struct-2.c | 65 +
.../libgomp.c-c++-common/declare-mapper-10.c | 60 +
.../libgomp.c-c++-common/declare-mapper-11.c | 59 +
.../libgomp.c-c++-common/declare-mapper-12.c | 87 +
.../libgomp.c-c++-common/declare-mapper-13.c | 55 +
.../libgomp.c-c++-common/declare-mapper-14.c | 57 +
.../libgomp.c-c++-common/declare-mapper-9.c | 62 +
.../libgomp.c-c++-common/ind-base-4.c | 50 +
.../libgomp.c-c++-common/unary-ptr-1.c | 16 +
.../libgomp.fortran/declare-mapper-10.f90 | 40 +
.../libgomp.fortran/declare-mapper-11.f90 | 38 +
.../libgomp.fortran/declare-mapper-12.f90 | 33 +
.../libgomp.fortran/declare-mapper-13.f90 | 49 +
.../libgomp.fortran/declare-mapper-15.f90 | 24 +
.../libgomp.fortran/declare-mapper-17.f90 | 92 +
.../libgomp.fortran/declare-mapper-18.f90 | 46 +
.../libgomp.fortran/declare-mapper-19.f90 | 29 +
.../libgomp.fortran/declare-mapper-2.f90 | 32 +
.../libgomp.fortran/declare-mapper-20.f90 | 29 +
.../libgomp.fortran/declare-mapper-21-p.f90 | 25 +
.../libgomp.fortran/declare-mapper-21.f90 | 26 +
.../libgomp.fortran/declare-mapper-3.f90 | 33 +
.../libgomp.fortran/declare-mapper-30-p.f90 | 25 +
.../libgomp.fortran/declare-mapper-30.f90 | 27 +
.../libgomp.fortran/declare-mapper-4-p.f90 | 41 +
.../libgomp.fortran/declare-mapper-4.f90 | 45 +
.../libgomp.fortran/declare-mapper-6.f90 | 28 +
.../libgomp.fortran/declare-mapper-7.f90 | 29 +
.../libgomp.fortran/declare-mapper-8.f90 | 115 +
.../libgomp.fortran/declare-mapper-9.f90 | 27 +
153 files changed, 13081 insertions(+), 853 deletions(-)
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-12.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-15.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-16.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-3.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-4.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-5.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-6.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-7.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-8.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-9.c
create mode 100644 gcc/testsuite/g++.dg/gomp/array-section-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/array-section-2.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-10.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-11.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-2.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-3.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-4.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-5.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-6.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-7.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-8.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-9.C
create mode 100644 gcc/testsuite/g++.dg/gomp/declare-mapper-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/declare-mapper-2.C
create mode 100644 gcc/testsuite/g++.dg/gomp/has_device_addr-non-lvalue-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/ind-base-3.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-assignment-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-inc-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-static-cast-lvalue-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-ternary-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/member-array-2.C
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-1.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-2.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-3.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-4.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-5.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-6.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-7.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-8.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/declare-mapper-10.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/declare-mapper-11.c
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-1.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-14.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-22-p.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-22.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-23.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-26-p.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-26.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-29.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-31-p.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-31.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-5.f90
create mode 100644 libgomp/testsuite/libgomp.c++/baseptrs-6.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-2.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-3.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-4.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-5.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-6.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-7.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-8.C
create mode 100644 libgomp/testsuite/libgomp.c++/ind-base-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/ind-base-2.C
create mode 100644 libgomp/testsuite/libgomp.c++/lvalue-tofrom-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/lvalue-tofrom-2.C
create mode 100644 libgomp/testsuite/libgomp.c++/map-comma-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/map-rvalue-ref-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/struct-ref-1.C
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/array-field-1.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/array-of-struct-1.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/array-of-struct-2.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-10.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-11.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-12.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-13.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-14.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-9.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/ind-base-4.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/unary-ptr-1.c
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-10.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-11.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-12.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-13.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-15.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-17.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-18.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-19.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-2.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-20.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-21-p.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-21.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-3.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-30-p.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-30.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-4-p.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-4.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-6.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-7.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-8.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-9.f90
--
2.41.0
More information about the Gcc-patches
mailing list