[flang-commits] [flang] [flang][runtime] Validate pointer DEALLOCATE (PR #78612)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Sat Jan 27 10:10:20 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()) {
----------------
klausler wrote:
I bet it's the presence of `stat=` in my tests that makes the difference. `PointerDeallocate()` should be called even without `stat=`. Will update.
https://github.com/llvm/llvm-project/pull/78612
More information about the flang-commits
mailing list