https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93826
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> --- OpenMP 5 lists under changes: "The collapse of associated loops that are imperfectly nested loops was defined for the worksharing-loop (see Section 2.9.2 on page 10), simd (see Section 2.9.3.1 on page 110), taskloop (see Section 2.10.2 on page 140) and distribute (see Section 2.9.4.2 on page 123) constructs." worksharing: https://www.openmp.org/spec-html/5.0/openmpsu41.html simd: https://www.openmp.org/spec-html/5.0/openmpsu42.html taskloop: https://www.openmp.org/spec-html/5.0/openmpsu47.html distribute: https://www.openmp.org/spec-html/5.0/openmpsu43.html Both C and Fortran example compile with PGI, PGI does set the variable to "x=5". The Intel compiler rejects C + Fortran code, Clang rejects the C example. Hence: – OpenMP 4.5: * gfortran has accept-invalid+diagnostic bug - OpenMP 5: * gfortran needs to diagnose 'order(concurrent)' (once the 'order' clause is implemented) * gcc/g++/gfortran needs to handle intervening code in the other cases. - OpenACC: need to reject the code.