// expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
++r;
#pragma omp parallel
// expected-note@+1 2 {{defined as reduction}}
#pragma omp for reduction(+ : r)
for(inti=0;i<10;++i)
#pragma omp task
// expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
++r;
// expected-note@+1 {{non-shared variable in a task construct is predetermined as firstprivate}}
#pragma omp task
// expected-error@+2 {{reduction variable must be shared}}
// expected-error@+1 {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
// expected-error@+1 {{argument of a reduction clause of a parallel construct must not appear in a firstprivate clause on a task construct}}
#pragma omp task firstprivate(r)
// expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
++r;
// expected-note@+1 {{defined as reduction}}
#pragma omp parallel reduction(+ : r)
#pragma omp task default(shared)
// expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
++r;
// expected-note@+1 {{defined as reduction}}
#pragma omp parallel reduction(+ : r)
#pragma omp task
// expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
++r;
#pragma omp parallel
// expected-note@+1 2 {{defined as reduction}}
#pragma omp for reduction(+ : r)
for(inti=0;i<10;++i)
// expected-error@+1 {{argument of a reduction clause of a for construct must not appear in a firstprivate clause on a task construct}}
#pragma omp task firstprivate(r)
// expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
++r;
#pragma omp parallel
// expected-note@+1 {{defined as reduction}}
#pragma omp for reduction(+ : r)
for(inti=0;i<10;++i)
#pragma omp task default(shared)
// expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
++r;
#pragma omp parallel
// expected-note@+1 {{defined as reduction}}
#pragma omp for reduction(+ : r)
for(inti=0;i<10;++i)
#pragma omp task
// expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
++r;
// expected-note@+1 {{non-shared variable in a task construct is predetermined as firstprivate}}
#pragma omp task
// expected-error@+2 {{reduction variable must be shared}}
// expected-error@+1 {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}