1
0
mirror of https://github.com/OpenMP/Examples.git synced 2025-04-11 00:42:12 +01:00
OpenMP-Examples/sources/Example_nesting_restrict.3.c

22 lines
352 B
C

/*
* @@name: nesting_restrict.3c
* @@type: C
* @@compilable: no
* @@linkable: no
* @@expect: failure
*/
void work(int i, int j) {}
void wrong3(int n)
{
#pragma omp parallel default(shared)
{
int i;
#pragma omp for
for (i=0; i<n; i++) {
/* incorrect nesting of regions */
#pragma omp single
work(i, 0);
}
}
}