[flang-commits] [flang] [llvm] [flang][OpenMP] Decompose compound constructs, do recursive lowering (PR #90098)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Tue May 14 11:39:15 PDT 2024


kparzysz wrote:

> This appears to cause a regression in LLVM testsuite gfortran testsuire FAIL: test-suite::gfortran-regression-compile-regression__gomp__reduction7_f90.test https://lab.llvm.org/buildbot/#/builders/197/builds/14288

That test has a `simd` directive with a `reduction` clause that has `task` modifier, which is not valid when used with `simd`.  The purpose of the test is to detect the use of the invalid modifier.  The decomposition code was trying to apply the modifier to the construct for which it is valid (as prescribed by the spec), but in this case it hasn't found such a construct, and ended up not applying the modifier at all.  This resulted in a `reduction` clause without the modifier, which is actually valid for `simd`, and was ultimately compiled successfully, against the expectation of the test.
I put out https://github.com/llvm/llvm-project/pull/92160 for this, but the proper fix would be to detect it in the semantic checks.  The decomposition code assumes that the code it deals with is valid, and the best it can do is to assert.

https://github.com/llvm/llvm-project/pull/90098


More information about the flang-commits mailing list