[all-commits] [llvm/llvm-project] b71bbb: [flang] Only deallocate intent(out) allocatable th...
Valentin Clement (バレンタイン クレメン) via All-commits
all-commits at lists.llvm.org
Wed Jan 11 00:27:35 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b71bbbb64ff92184e13a793b71982df4cdee0271
https://github.com/llvm/llvm-project/commit/b71bbbb64ff92184e13a793b71982df4cdee0271
Author: Valentin Clement <clementval at gmail.com>
Date: 2023-01-11 (Wed, 11 Jan 2023)
Changed paths:
M flang/lib/Lower/ConvertExpr.cpp
M flang/lib/Lower/ConvertVariable.cpp
M flang/test/Lower/intentout-deallocate.f90
Log Message:
-----------
[flang] Only deallocate intent(out) allocatable through runtime if allocated
Deallocation of intent(out) allocatable was done in D133348. This patch adds
an if guard when the deallocation is done through a runtime call. The runtime
is crashing if the box is not allocated. Call the runtime only if the box is
allocated. This is the case for derived type, polymorphic and unlimited
polymorphic entities.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D141427
More information about the All-commits
mailing list