Retro68/gcc/libgomp/testsuite/libgomp.c/examples-4/array_sections-4.c
2017-04-10 13:32:00 +02:00

28 lines
332 B
C

/* { dg-do run } */
#include <stdlib.h>
void foo ()
{
int A[30], *p;
#pragma omp target data map(A[0:10])
{
p = &A[0];
#pragma omp target map(p[3:7]) map(A[0:10])
{
A[2] = 777;
A[8] = 777;
p[8] = 999;
}
}
if (A[2] != 777 || A[8] != 999)
abort ();
}
int main ()
{
foo ();
return 0;
}