[flang-commits] [flang] [flang][OpenMP] Fix crash when a sliced array is specified in a forall within a workshare construct (PR #170913)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Sun Dec 21 10:43:35 PST 2025


tblah wrote:

Unless I am missunderstanding your comment, I think that OMP_NUM_THREADS is an environment variable which alters the runtime behaviour of the executable. It does not change the generated code, and the same executable run with different values of OMP_NUM_THREADS in the environment will behave differently.

I agree that it isn't really feasible to test for the problem in the issue itself - as you say this is intermittent depending upon the order in which different threads are scheduled. However, I think your changes will lead to differences in the generated IR (for example the missing nowait). These could be tested in a lit test.

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


More information about the flang-commits mailing list