OpenACC "present" subarrays: runtime API return value and unmapping fixes
authorJulian Brown <julian@codesourcery.com>
Wed, 20 Nov 2019 17:51:09 +0000 (17:51 +0000)
committerJulian Brown <jules@gcc.gnu.org>
Wed, 20 Nov 2019 17:51:09 +0000 (17:51 +0000)
commite307b05f4377a22811395f6a051d9db864b8785f
tree3b7a12b5b4cd395997af29e9da4c99400e961d52
parent070e3489678380354027144c6b0cef02e7601a37
OpenACC "present" subarrays: runtime API return value and unmapping fixes

PR libgomp/92511

libgomp/
* oacc-mem.c (present_create_copy): Fix device pointer return value in
case of "present" subarray.  Use tgt->tgt_start instead of tgt->to_free
in non-present/create case.
(delete_copyout): Change error condition to fail only on copies outside
of mapped block.  Adjust error message accordingly.
* testsuite/libgomp.oacc-c-c++-common/copyin-devptr-1.c: New test.
* testsuite/libgomp.oacc-c-c++-common/copyin-devptr-2.c: New test.
* testsuite/libgomp.oacc-c-c++-common/lib-20.c: Adjust expected error
message.
* testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-22.c: Allow test to pass now.
* testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r278514
libgomp/ChangeLog
libgomp/oacc-mem.c
libgomp/testsuite/libgomp.oacc-c-c++-common/copyin-devptr-1.c [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-c-c++-common/copyin-devptr-2.c [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-20.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-22.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-23.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-30.c