[all-commits] [llvm/llvm-project] 0c7d0a: [flang] Deallocate local allocatable at end of the...

jeanPerier via All-commits all-commits at lists.llvm.org
Thu Sep 21 23:58:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0c7d0ad9f7e61af35b3afa2da5b94520100bbdfd
      https://github.com/llvm/llvm-project/commit/0c7d0ad9f7e61af35b3afa2da5b94520100bbdfd
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2023-09-22 (Fri, 22 Sep 2023)

  Changed paths:
    M flang/lib/Lower/ConvertVariable.cpp
    A flang/test/Lower/HLFIR/allocatable-end-of-scope-dealloc.f90
    M flang/test/Lower/allocatable-polymorphic.f90

  Log Message:
  -----------
  [flang] Deallocate local allocatable at end of their scopes (#67036)

Implement automatic deallocation of unsaved local alloctables when
reaching the end of their scope of block as described in Fortran 2018
9.7.3.2 point 2. and 3.

Uses genDeallocateIfAllocated used for intent(out) deallocation and the
"function context" already used for finalization at end of scope.




More information about the All-commits mailing list