[flang-commits] [flang] [mlir] [flang][OpenMP] Lower allocator-backed storage for allocate clauses (PR #211621)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Fri Jul 24 07:00:25 PDT 2026


================
@@ -3498,6 +3285,59 @@ genParallelOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
   assert((!enableDelayedPrivatization || dsp) &&
          "expected valid DataSharingProcessor");
 
+  if (!clauseOps.allocateVars.empty()) {
+    llvm::DenseMap<const semantics::Symbol *, int64_t> privateSlots;
+    for (auto [index, object] : llvm::enumerate(args.priv.objects)) {
+      const semantics::Symbol *symbol = object.sym();
+      if (!symbol)
+        TODO(loc, "ALLOCATE clause private item without a semantic symbol");
----------------
tblah wrote:

Is this something to be implemented later or a compiler bug? If it is just a bug then use a normal fatal error.

And see others further down. You can use `fir::emitFatalError` or assertions for things that are bugs rather than unimplemented features.

In general, the real TODOs are the ones in the test you added in test/Lower/OpenMP/Todo

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


More information about the flang-commits mailing list