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

18 lines
290 B
C

/* { dg-do run } */
#include <stdlib.h>
int main()
{
int x = 1;
#pragma omp parallel
#pragma omp single
{
#pragma omp task shared(x) depend(out: x)
x = 2;
#pragma omp task shared(x) depend(in: x)
if (x != 2)
abort ();
}
return 0;
}