1
0
mirror of https://github.com/OpenMP/Examples.git synced 2025-04-10 16:32:11 +01:00
OpenMP-Examples/sources/Example_nesting_restrict.5c.c
2015-01-13 11:38:24 -08:00

22 lines
350 B
C

/*
* @@name: nesting_restrict.5c
* @@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);
}
}
}