[flang-commits] [flang] [flang][OpenMP] Catch threadprivate common block vars that appear in equivalence (PR #127642)
Michael Klemm via flang-commits
flang-commits at lists.llvm.org
Fri Feb 6 05:54:45 PST 2026
mjklemm wrote:
We also had this issue downstream. Downstream we have decided to accept the code if a compiler flagis provided by the user and the compiler will warn about the code being incorrect. Currently, this compiler flags only works in a single-threaded environment, as we have not yet updated the code-gen for that case.
I would not accept the code by default, as it does not have well-defined semantics as per the OpenMP API specification as cited above. So, I'd opposed to silently accepting this pattern due to its non-conformance to the OpenMP API and data-sharing issues that can arise from this.
@ohno-fj Can you please provide a summary of the semantics that the Fujitsu compiler uses for this? I will speak to Intel about how their compiler treats this and see if we can implement similar semantics under the suggested compiler flag.
Would this be an acceptable compromise for everyone?
https://github.com/llvm/llvm-project/pull/127642
More information about the flang-commits
mailing list