diff options
author | James Norris <jnorris@codesourcery.com> | 2016-03-23 14:38:55 +0000 |
---|---|---|
committer | James Norris <jnorris@gcc.gnu.org> | 2016-03-23 14:38:55 +0000 |
commit | b6d1f2b546079eb367b497228ca54d97dddc8921 (patch) | |
tree | b61c3765495e12b6d7a5da3434336350bf8e7cd3 /libgomp/oacc-mem.c | |
parent | 4d8989d5b0602dff77945e68c74eab91a8278b97 (diff) | |
download | gcc-b6d1f2b546079eb367b497228ca54d97dddc8921.zip gcc-b6d1f2b546079eb367b497228ca54d97dddc8921.tar.gz gcc-b6d1f2b546079eb367b497228ca54d97dddc8921.tar.bz2 |
re PR libgomp/69414 ([OpenACC] "!$acc update self" does not provide expected result)
PR libgomp/69414
* oacc-mem.c (delete_copyout, update_dev_host): Fix device address.
* testsuite/libgomp.oacc-c-c++-common/update-1.c: Additional tests.
* testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
* testsuite/libgomp.oacc-fortran/update-1.f90: New file.
Co-Authored-By: Daichi Fukuoka <dc-fukuoka@sgi.com>
From-SVN: r234428
Diffstat (limited to 'libgomp/oacc-mem.c')
-rw-r--r-- | libgomp/oacc-mem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libgomp/oacc-mem.c b/libgomp/oacc-mem.c index f6cc373..ce1905c 100644 --- a/libgomp/oacc-mem.c +++ b/libgomp/oacc-mem.c @@ -509,7 +509,8 @@ delete_copyout (unsigned f, void *h, size_t s) gomp_fatal ("[%p,%d] is not mapped", (void *)h, (int)s); } - d = (void *) (n->tgt->tgt_start + n->tgt_offset); + d = (void *) (n->tgt->tgt_start + n->tgt_offset + + (uintptr_t) h - n->host_start); host_size = n->host_end - n->host_start; @@ -562,7 +563,8 @@ update_dev_host (int is_dev, void *h, size_t s) gomp_fatal ("[%p,%d] is not mapped", h, (int)s); } - d = (void *) (n->tgt->tgt_start + n->tgt_offset); + d = (void *) (n->tgt->tgt_start + n->tgt_offset + + (uintptr_t) h - n->host_start); gomp_mutex_unlock (&acc_dev->lock); |