https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71014
--- Comment #9 from Keith Lindsay <klindsay at ucar dot edu> --- Harald, Thanks for your tips on validation/sanitizing tools. I am not sufficiently fluent in standard-ese to know what 'associated do-loops(s)" means. It doesn't help that BLOCK and ASSOCIATE appear in other contexts in the OpenMP standard, making it challenging to locate information about them in the standard. If I replace ASSOCIATE with BLOCK/END BLOCK, I do see the same problems. I added -fdump-tree-original to the gfortran invocation and compiled code with and without the BLOCK construct. The generated intermediate files have the difference @@ -6,7 +6,7 @@ static integer(kind=4) s_true = 5050; s = {}; - #pragma omp parallel private(i) + #pragma omp parallel { { #pragma omp for private(j) nowait (There are other differences that appear to simply be renaming of labels, I'm ignoring those.) So it does seem that the presence of the BLOCK construct is changing how the compiler assigns attributes to the inner loop index. I didn't think this was correct, but perhaps I'm misunderstanding how the OpenMP and Fortran standards interact. At this point, I would like to know if the compiler is in the right in doing this. If it is, then I would change my coding practice. If it isn't, then I assume that gfortran developers would want to know about this. Keith