https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100497
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> --- Oddly, if one replaces #pragma omp target teams distribute parallel for reduction(||: orfc) map(orfc) by #pragma omp target map(orfc) { #pragma teams distribute parallel for reduction(||: orfc) for (int i=0; i < N; ++i) orfc = orfc || rf[i]; } the generated code vastly differs by not generating any 'omp teams distribute for' code but just the plain for loop, which works. Shouldn't this both generate the same code? (The omp-lower dump shows 'omp target num_teams(0)' for the combined statement and 'omp target num_teams(1)' for the separate statement, whatever that clause means for a target directive.)