mirror of
https://github.com/autc04/Retro68.git
synced 2025-01-18 20:31:19 +00:00
21 lines
343 B
C
21 lines
343 B
C
/* { dg-do run } */
|
|
|
|
#include <stdlib.h>
|
|
|
|
int main()
|
|
{
|
|
int x = 0;
|
|
#pragma omp parallel
|
|
#pragma omp single
|
|
{
|
|
#pragma omp task shared(x) depend(out: x)
|
|
x = 1;
|
|
#pragma omp task shared(x) depend(out: x)
|
|
x = 2;
|
|
#pragma omp taskwait
|
|
if (x != 1 && x != 2)
|
|
abort ();
|
|
}
|
|
return 0;
|
|
}
|