[flang-commits] [flang] [Flang][OpenMP] Add Semantic Checks for Atomic Capture Construct (PR #108516)

via flang-commits flang-commits at lists.llvm.org
Thu Sep 19 03:18:01 PDT 2024


harishch4 wrote:

> > > Errors are not emitted for the following program. Is that expected?
> > 
> > 
> > Thanks for the review. This is not expected, it looks like gfortran and ifx compilers are also not throwing an error. https://godbolt.org/z/sbYW9Tv3E
> 
> I think it is the use of taking the first symbol from the SymbolVector that is leading to this situation. Could you check the lowering code to see what is used there to match the variable in the atomic update on the RHS?

Even lowering is generating incorrect code, r1 is being used in atomic update instead of r2. Similarly V1(2) instead of V1(1) : https://godbolt.org/z/j4G18938n

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


More information about the flang-commits mailing list