mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-10 08:22:11 +01:00
22 lines
364 B
C
22 lines
364 B
C
/*
|
|
* @@name: nesting_restrict.3
|
|
* @@type: C
|
|
* @@operation: compile
|
|
* @@expect: ct-error
|
|
* @@version: pre_omp_3.0
|
|
*/
|
|
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);
|
|
}
|
|
}
|
|
}
|