[flang] Check if dummy is allocated before deallocation for optional intent(out)
authorValentin Clement <clementval@gmail.com>
Thu, 9 Mar 2023 16:48:11 +0000 (17:48 +0100)
committerValentin Clement <clementval@gmail.com>
Thu, 9 Mar 2023 16:48:34 +0000 (17:48 +0100)
commit8d394367d39fddeeb56a43d64f0df209162b330a
treeb1811b18c0c4b36f2fc4a5cc5670d88fdcdf8174
parent589e6bcbc98daa6d3eaa7d65432a793f1f708b12
[flang] Check if dummy is allocated before deallocation for optional intent(out)

Similary to non-optional argument, check if the argument is allocated before
doing the deallocation for intent(out) optional.

Depends on D145679

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D145682
flang/lib/Lower/ConvertVariable.cpp
flang/test/Lower/intentout-deallocate.f90