diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2019-12-09 23:52:56 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2019-12-09 23:52:56 +0100 |
commit | 47afc7b4ddd124bf8bb0747920c5e5906e4704c3 (patch) | |
tree | ab50a6d8c9d2d8c3ce075a07fc9d2d8c32a5a207 /libgomp/testsuite/libgomp.oacc-c-c++-common/pr92877-1.c | |
parent | cec41816c18f2857f8362825222ef4de0a6e596e (diff) | |
download | gcc-47afc7b4ddd124bf8bb0747920c5e5906e4704c3.zip gcc-47afc7b4ddd124bf8bb0747920c5e5906e4704c3.tar.gz gcc-47afc7b4ddd124bf8bb0747920c5e5906e4704c3.tar.bz2 |
[PR92116, PR92877] [OpenACC] Replace 'openacc.data_environ' by standard libgomp mechanics
libgomp/
PR libgomp/92116
PR libgomp/92877
* oacc-mem.c (lookup_dev): Reimplement. Adjust all users.
* libgomp.h (struct acc_dispatch_t): Remove 'data_environ' member.
Adjust all users.
* testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4-2.c:
Remove XFAIL.
* testsuite/libgomp.oacc-c-c++-common/acc_free-pr92503-4.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/pr92877-1.c: New file.
Co-Authored-By: Julian Brown <julian@codesourcery.com>
From-SVN: r279147
Diffstat (limited to 'libgomp/testsuite/libgomp.oacc-c-c++-common/pr92877-1.c')
-rw-r--r-- | libgomp/testsuite/libgomp.oacc-c-c++-common/pr92877-1.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr92877-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr92877-1.c new file mode 100644 index 0000000..02595a9 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr92877-1.c @@ -0,0 +1,19 @@ +/* Make sure that we can resolve back via 'acc_hostptr' an 'acc_deviceptr' + retrieved for a structured mapping. */ + +#include <assert.h> +#include <openacc.h> + +int +main () +{ + int var; + +#pragma acc data create (var) + { + void *var_p_d = acc_deviceptr (&var); + assert (acc_hostptr (var_p_d) == &var); + } + + return 0; +} |