]> git.ipfire.org Git - thirdparty/gcc.git/commit
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)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:17:05 +0000 (13:17 -0300)
commit0e6795e5f7a87e678f6fe6e94865eabd71f99c91
tree0619b55f29c4c0d520d4214d05629cb02073509a
parent07ee492e1437ca43263e06857f2055c07782b7e1
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]