[flang-commits] [flang] [flang][OpenMP] Error out when CHARACTER type is used in atomic constructs (PR #113045)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Tue Oct 22 02:52:22 PDT 2024


================
@@ -128,6 +128,7 @@ static void processOmpAtomicTODO(mlir::Type elementType,
                              Fortran::parser::OmpAtomicClauseList>()) {
     // Based on assertion for supported element types in OMPIRBuilder.cpp
     // createAtomicRead
+    // TODO: Enumerate remaining unsupported types for atomics
     mlir::Type unwrappedEleTy = fir::unwrapRefType(elementType);
     bool supportedAtomicType = fir::isa_trivial(unwrappedEleTy);
----------------
tblah wrote:

I would replace the function with something like `assert(fir::isa_trivial(fir::unwrapRefType(elementType)) && "is supported type for omp atomic")`

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


More information about the flang-commits mailing list