gcc/libgomp/testsuite/libgomp.c-c++-common/struct-elem-5.c
Chung-Lin Tang e067201737 testsuite/101114: Adjust libgomp.c-c++-common/struct-elem-5.c testcase
The dg-shouldfail testcase libgomp.c-c++-common/struct-elem-5.c does not
properly fail for non-shared address space offloading. Adjust testcase
to limit testing only for "target offload_device_nonshared_as".

libgomp/ChangeLog:

	PR testsuite/101114
	* testsuite/libgomp.c-c++-common/struct-elem-5.c:
	Add "target offload_device_nonshared_as" condition for enabling test.
2021-06-26 00:46:11 +08:00

21 lines
476 B
C

/* { dg-do run { target offload_device_nonshared_as } } */
struct S
{
int a, b, c;
};
typedef struct S S;
int main (void)
{
S s;
#pragma omp target data map (alloc: s.a, s.c)
{
#pragma omp target enter data map (alloc: s.b)
}
return 0;
}
/* { dg-output "Trying to map into device \\\[\[0-9a-fA-FxX\]+..\[0-9a-fA-FxX\]+\\\) structure element when other mapped elements from the same structure weren't mapped together with it" } */
/* { dg-shouldfail "" } */