[flang-commits] [flang] [flang][runtime] Validate pointer DEALLOCATE (PR #78612)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Fri Jan 26 16:49:01 PST 2024


================
@@ -454,7 +454,9 @@ class AllocateStmtHelper {
                            const fir::MutableBoxValue &box) {
     if (!box.isDerived() && !errorManager.hasStatSpec() &&
         !alloc.type.IsPolymorphic() && !alloc.hasCoarraySpec() &&
-        !useAllocateRuntime) {
+        !useAllocateRuntime && !box.isPointer()) {
----------------
vzakhari wrote:

Should there be the same check in `genDeallocate` below?

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


More information about the flang-commits mailing list