diff options
author | Cesar Philippidis <cesar@codesourcery.com> | 2018-11-30 12:39:49 -0800 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2018-11-30 21:39:49 +0100 |
commit | fe570ff8d4347ea98108da3cf0d4f3800294d5c5 (patch) | |
tree | bed3444f5ac3e46f1889acb012e868bac81da4ef /libgomp/oacc-parallel.c | |
parent | 344b0fdf2ee426f81cf8ceafa069c42cfdc9f5fc (diff) | |
download | gcc-fe570ff8d4347ea98108da3cf0d4f3800294d5c5.tar.gz |
[PR88288, OpenACC, libgomp] Adjust offsets for present data clauses
Make libgomp respect the on device offset of subarrays which may arise in
present data clauses.
libgomp/
PR libgomp/88288
* oacc-parallel.c (GOACC_parallel_keyed): Add offset to devaddrs.
* testsuite/libgomp.oacc-c-c++-common/pr88288.c: New test.
Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r266688
Diffstat (limited to 'libgomp/oacc-parallel.c')
-rw-r--r-- | libgomp/oacc-parallel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libgomp/oacc-parallel.c b/libgomp/oacc-parallel.c index b80ace58590..1e08af70b4d 100644 --- a/libgomp/oacc-parallel.c +++ b/libgomp/oacc-parallel.c @@ -232,7 +232,8 @@ GOACC_parallel_keyed (int device, void (*fn) (void *), devaddrs = gomp_alloca (sizeof (void *) * mapnum); for (i = 0; i < mapnum; i++) devaddrs[i] = (void *) (tgt->list[i].key->tgt->tgt_start - + tgt->list[i].key->tgt_offset); + + tgt->list[i].key->tgt_offset + + tgt->list[i].offset); acc_dev->openacc.exec_func (tgt_fn, mapnum, hostaddrs, devaddrs, async, dims, tgt); |