gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/pr92877-1.c
Thomas Schwinge 47afc7b4dd [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
2019-12-09 23:52:56 +01:00

20 lines
326 B
C

/* 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;
}