diff options
author | Cesar Philippidis <cesar@codesourcery.com> | 2018-09-12 08:21:19 -0700 |
---|---|---|
committer | Julian Brown <jules@gcc.gnu.org> | 2018-09-12 15:21:19 +0000 |
commit | 8e36332cf65b4ec5a1ea6b4b3a6ae8cb6ed9f455 (patch) | |
tree | 21b85dccb3c797eff6332dff0040809c140e8351 /gcc/gimplify.c | |
parent | c749305900f8afab04948702e637579b2db2199a (diff) | |
download | gcc-8e36332cf65b4ec5a1ea6b4b3a6ae8cb6ed9f455.zip gcc-8e36332cf65b4ec5a1ea6b4b3a6ae8cb6ed9f455.tar.gz gcc-8e36332cf65b4ec5a1ea6b4b3a6ae8cb6ed9f455.tar.bz2 |
[OpenACC] C++ reference mapping
2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
Julian Brown <julian@codesourcery.com>
PR middle-end/86336
gcc/cp/
* semantics.c (finish_omp_clauses): Treat C++ references the same in
OpenACC as OpenMP.
gcc/
* gimplify.c (gimplify_scan_omp_clauses): Set
target_firstprivatize_array_bases in OpenACC parallel and kernels
region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
OpenACC data regions.
libgomp/
* testsuite/libgomp.oacc-c++/non-scalar-data.C: Remove XFAIL.
Co-Authored-By: Julian Brown <julian@codesourcery.com>
From-SVN: r264244
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index dbd0f0e..f0eb04a 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -7513,6 +7513,8 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, case OMP_TARGET_EXIT_DATA: case OACC_DECLARE: case OACC_HOST_DATA: + case OACC_PARALLEL: + case OACC_KERNELS: ctx->target_firstprivatize_array_bases = true; default: break; @@ -8556,7 +8558,8 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, if (code == OACC_DATA && OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP - && OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FIRSTPRIVATE_POINTER) + && (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FIRSTPRIVATE_POINTER + || OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FIRSTPRIVATE_REFERENCE)) remove = true; if (remove) *list_p = OMP_CLAUSE_CHAIN (c); |