[flang-commits] [flang] [Flang][OpenMP][Sema] Add OpenMP warning when mapping local descriptors to device on enter without a corresponding exit (PR #201060)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Mon Jun 8 06:44:36 PDT 2026


================
@@ -249,6 +249,29 @@ bool IsMapExitingType(parser::OmpMapType::Value type) {
   }
 }
 
+// This function aims to return true when a symbol is going to result
+// in a temporary stack descriptor being allocated for it in the
+// lowering that may pose an issue for data mapping if left on
+// device accidentally.
+bool HasTemporaryStackDescriptor(const Symbol &symbol) {
+  const Symbol &ultimate{symbol.GetUltimate()};
+  bool isDummy = IsDummy(ultimate);
----------------
kparzysz wrote:

We're still using bracket initialization...

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


More information about the flang-commits mailing list