[flang-commits] [flang] [mlir] [llvm][mlir][OpenMP] Support translation for linear clause in omp.wsloop and omp.simd (PR #139386)

via flang-commits flang-commits at lists.llvm.org
Fri Dec 5 21:42:10 PST 2025


NimishMishra wrote:

> > `FAIL: test-suite::gfortran-regression-compile-regression__gomp__linear-5_f90.test `
> > Could you please look at this ?
> 
> Thanks for letting me know. Somehow, when I tested the testsuite locally, I did not observe a failure; probably an issue with my setup, which I will investigate and resolve. Apologies for the noise.
> 
> I am working towards a fix and will upstream tomorrow.


I investigated the issue. With the merger of this PR, LLVM Flang is incorrectly compiling `linear-5.f90` when it should not. For instance, consider the following:

```
!$omp parallel do simd linear (x: uval, step (y+1))
```

Currently, with flag `-fopenmp`, LLVM Flang is emitting a warning: `step-complex-modifier is not supported in OpenMP v3.1, try -fopenmp-version=52`. When the OpenMP version is used to be v5.2, an error (as expected) is emitted. The default OpenMP version (v3.1) cannot check the standard compliance in `linear-5.f90`, and it chooses to report this as a warning, rather than an error. Essentially, OpenMP version mismatch being reported as a warning is currently allowing incorrect code to be compiled.


@tblah @kiranchandramohan Any suggestions on how to handle this? Would it make sense to report incapability of default OpenMP versioning to reliably check the Fortran source as an error, and not a warning? 

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


More information about the flang-commits mailing list