openacc: Set bias to zero for explicit attach/detach clauses in C and C++
authorJulian Brown <julian@codesourcery.com>
Tue, 9 Jun 2020 13:21:34 +0000 (06:21 -0700)
committerJulian Brown <julian@codesourcery.com>
Thu, 9 Jul 2020 22:17:52 +0000 (15:17 -0700)
commit0d00fe404c162ad0cf922ca8455aa23a74042b63
tree7bfe4e084bf6104faaed0ed4a85fe8296c627799
parent8d2e5026d22b3f30e7df7adfd4ebf4ebc1e77e2d
openacc: Set bias to zero for explicit attach/detach clauses in C and C++

This is a fix for the pointer (or array) size inadvertently being used
for the bias with attach and detach mapping kinds, for both C and C++.

2020-07-09  Julian Brown  <julian@codesourcery.com>
    Thomas Schwinge  <thomas@codesourcery.com>

gcc/c/
PR middle-end/95270
* c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
for standalone attach/detach clauses.

gcc/cp/
PR middle-end/95270
* semantics.c (finish_omp_clauses): Likewise.

include/
PR middle-end/95270
* gomp-constants.h (gomp_map_kind): Expand comment for attach/detach
mapping kinds.

gcc/testsuite/
PR middle-end/95270
* c-c++-common/goacc/mdc-1.c: Update expected dump output for zero
bias.

libgomp/
PR middle-end/95270
* testsuite/libgomp.oacc-c-c++-common/pr95270-1.c: New test.
* testsuite/libgomp.oacc-c-c++-common/pr95270-2.c: New test.
gcc/c/c-typeck.c
gcc/cp/semantics.c
gcc/testsuite/c-c++-common/goacc/mdc-1.c
include/gomp-constants.h
libgomp/testsuite/libgomp.oacc-c-c++-common/pr95270-1.c [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-c-c++-common/pr95270-2.c [new file with mode: 0644]