2022-11-04 09:35:42 -07:00

19 lines
268 B
C

/*
* @@name: tasking.12
* @@type: C
* @@operation: compile
* @@expect: rt-error
* @@version: omp_3.1
*/
#include <stdio.h>
void foo ( )
{
int x = 2;
#pragma omp task mergeable
{
x++;
}
#pragma omp taskwait
printf("%d\n",x); // prints 2 or 3
}