Retro68/gcc/libgomp/testsuite/libgomp.c/target-30.c
2017-04-10 13:32:00 +02:00

25 lines
445 B
C

extern void abort (void);
#pragma omp declare target
int v = 6;
#pragma omp end declare target
int
main ()
{
#pragma omp target /* predetermined map(tofrom: v) */
v++;
#pragma omp target update from (v)
if (v != 7)
abort ();
#pragma omp parallel private (v) num_threads (1)
{
#pragma omp target /* predetermined firstprivate(v) */
v++;
}
#pragma omp target update from (v)
if (v != 7)
abort ();
return 0;
}