void foo (void) { int i; i = 0; #pragma omp parallel shared (i) { #pragma omp master i++; #pragma omp parallel for for (i = 0; i < 10; i++) ; } }
results in very weird omplower dump: 1) #pragma omp parallel shared(iD.1922) private(iD.1922) for the outer parallel (surely we don't want i being shared and private at the same time, just shared here) 2) #pragma omp parallel shared(iD.1922) for the inner parallel - in this case i certainly ought to be private, not shared I think 1) is caused by n->value = GOVD_PRIVATE; messing up outer context, while 2) probably because omp_is_private shouldn't recurse over is_parallel contexts. -- Summary: omp_is_private issues Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: openmp Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27388