[flang-commits] [flang] [flang][OpenACC] Release declare-create allocatable on deallocate (PR #220541)

via flang-commits flang-commits at lists.llvm.org
Wed Sep 2 08:57:50 PDT 2026


================
@@ -5251,8 +5251,10 @@ void Fortran::lower::declareExternalAccModuleDeclareActionRecipes(
   declareExternalRecipe(declarePostAllocSuffix);
   if (ultimate.test(Flag::AccCreate) || ultimate.test(Flag::AccCopyIn) ||
       ultimate.test(Flag::AccCopyInReadOnly) || ultimate.test(Flag::AccCopy) ||
-      ultimate.test(Flag::AccCopyOut) || ultimate.test(Flag::AccDeviceResident))
-    declareExternalRecipe(declarePostDeallocSuffix);
+      ultimate.test(Flag::AccCopyOut) ||
+      ultimate.test(Flag::AccDeviceResident)) {
+    declareExternalRecipe(declarePreDeallocSuffix);
+  }
----------------
khaki3 wrote:

Thanks. The braces were leftovers from the previous version, where I tried to use both pre- and post-hooks.

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


More information about the flang-commits mailing list