[flang-commits] [flang] [llvm] [flang][llvm][OpenMP][OpenACC] Add implicit casts to omp.atomic and acc.atomic (PR #131603)

via flang-commits flang-commits at lists.llvm.org
Tue Apr 15 07:37:45 PDT 2025


================
@@ -386,6 +442,7 @@ void genOmpAccAtomicRead(Fortran::lower::AbstractConverter &converter,
       fir::getBase(converter.genExprAddr(fromExpr, stmtCtx));
   mlir::Value toAddress = fir::getBase(converter.genExprAddr(
       *Fortran::semantics::GetExpr(assignmentStmtVariable), stmtCtx));
+  emitImplicitCast(converter, loc, fromAddress, toAddress, elementType);
----------------
NimishMishra wrote:

Hi @tblah and @kiranchandramohan,

Even with typed statements, I could not get around the issue with atomic capture. I have thus fixed atomic read, and added a TODO for atomic capture. Would that be fine?

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


More information about the flang-commits mailing list