OpenMP-Examples/program_control/sources/nesting_restrict.5.c
2022-04-18 15:02:25 -07:00

22 lines
349 B
C

/*
* @@name: nesting_restrict.5
* @@type: C
* @@compilable: no
* @@linkable: no
* @@expect: failure
*/
void work(int i, int j) {}
void wrong5(int n)
{
#pragma omp parallel
{
#pragma omp critical
{
work(n, 0);
/* incorrect nesting of barrier region in a critical region */
#pragma omp barrier
work(n, 1);
}
}
}